Download the PHP package mariohamann/statamic-figma-assets without Composer
On this page you can find all versions of the php package mariohamann/statamic-figma-assets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mariohamann/statamic-figma-assets
More information about mariohamann/statamic-figma-assets
Files in mariohamann/statamic-figma-assets
Package statamic-figma-assets
Short Description A Statamic addon to import assets from Figma.
License MIT
Homepage https://github.com/mariohamann/statamic-figma-assets
Informations about the package statamic-figma-assets
Statamic Figma Assets
Statamic Figma Assets is an addon that allows you to import assets from Figma into your Statamic site.
Features
- π¨ Import icons, illustrations, photos, and other assets from Figma
- ποΈ Flexible configuration for asset container, format, size, and more
- π "Smart" Importing β import all assets or only new ones
- ποΈ Optimized performance with batched generation pooled downloads
- π οΈ Transformers for fine-grained filtering and naming of assets
- βΎοΈ Unlimited configurations for multiple Figma files, asset containers, formats etc.
Setup
You can install this addon via Composer:
Once installed, head over to Utilities > Figma Assets in the Statamic control panel to start importing.
The compiled Control Panel assets are included in each release and published automatically by Statamic. Consumers do not need Node or an asset build step. To re-publish them after deployment, run:
Development, tests, and release procedures are in CONTRIBUTING.md.
Configuration
Quick setup (via .env)
If you're fine with using the defaults, it's enough to set some configuration values in your .env file, for example:
Advanced setup
For more advanced configuration and multiple configurations, you can publish the config file:
This will create a config/statamic-figma-assets.php file where you can set the default values for the addon.
From there, you can define multiple configurations and tweak every option to your needs.
Example configuration
Asset transformer
assets_transformer is an optional class name implementing MarioHamann\StatamicFigmaAssets\Contracts\AssetsTransformer. Laravel resolves it from the container, so it may use dependency injection and remains compatible with php artisan config:cache.
Before-upload processor
before_upload is an optional class name implementing MarioHamann\StatamicFigmaAssets\Contracts\BeforeUploadProcessor. It receives the temporary file path and must return an existing file path.
For example, an SVG processor may invoke SVGO:
Closures are not supported in the configuration because Laravel cannot cache a configuration file containing closures. Run php artisan config:cache after configuring the addon to verify your deployment configuration.