Packages
open_fresco
0.1.0
Server-side OG-image / social-card rendering, built on Fresco. A scene model (text, image, shape, button) with fills/gradients, {{slot}} templating, measured word-wrap, anchoring, and responsive sizing — rendered to SVG or PNG (via the optional resvg dependency).
Current section
Files
Jump to
Current section
Files
open_fresco
mix.exs
mix.exs
defmodule OpenFresco.MixProject do
use Mix.Project
@version "0.1.0"
@description "Server-side OG-image / social-card rendering, built on Fresco. A scene model (text, image, shape, button) with fills/gradients, {{slot}} templating, measured word-wrap, anchoring, and responsive sizing — rendered to SVG or PNG (via the optional resvg dependency)."
@source_url "https://github.com/alexdont/open_fresco"
def project do
[
app: :open_fresco,
version: @version,
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
description: @description,
package: package(),
docs: docs(),
deps: deps()
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:jason, "~> 1.4"},
# SVG → PNG rasterizer. Optional: hosts that only use the SVG generator
# or editor don't pay for the native NIF. When absent,
# OpenFresco.Rasterizer falls back to a `resvg`/`rsvg-convert`/`magick`
# CLI on PATH, else returns {:error, :rasterizer_missing}. Add
# `{:resvg, "~> 0.5"}` in the host app to enable the embedded NIF.
{:resvg, "~> 0.5", optional: true},
# The editor stage (OpenFresco.Editor) is a LiveComponent — optional so
# render-only / SVG-only hosts don't pull in the web stack.
{:phoenix_live_view, "~> 1.0", optional: true},
{:ex_doc, "~> 0.39", only: :dev, runtime: false}
]
end
defp package do
[
licenses: ["MIT"],
links: %{"GitHub" => @source_url},
# `priv` ships the editor's JS hook (priv/static/open_fresco.js).
files: ~w(lib priv mix.exs README.md CHANGELOG.md LICENSE .formatter.exs)
]
end
defp docs do
[
main: "OpenFresco",
source_ref: "v#{@version}",
source_url: @source_url
]
end
end