becklyn / mimeo
Mimeo: copy (static) assets from NPM packages into your symfony project.
Installs: 6 857
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.4
- ext-json: *
- symfony/config: ^v5.4.3 || ^v6.0.3
- symfony/console: ^v5.4.3 || ^v6.0.3
- symfony/dependency-injection: ^v5.4.3 || ^v6.0.3
- symfony/http-kernel: ^v5.4.3 || ^v6.0.3
Requires (Dev)
- roave/security-advisories: dev-master
- symfony/phpunit-bridge: ^v5.4.3 || ^v6.0.3
README
Mimeo: copy (static) assets from NPM packages into your symfony project.
The name is inspired by the short name of a mimeograph.
Integration of Installation Paths
The symfony bundle can choose where the mimeo assets should be installed to. If the packages use SCSS files that reference these assets relatively, the installation path must be adapted.
The npm package, as well as the project that is using these assets, are supposed to declare (Symfony) respectively use (SCSS) a global variable called $mimeo-install-path
.
The path must not end with a /
.
In the npm package SCSS this can look like this:
$mimeo-install-path: ".." !default; // .. later .. a { background-image: url("#{$mimeo-install-path}/install-dir/img/example.jpg"); }
And in your project's SCSS like this:
$mimeo-install-path: "../mimeo"; @import "@becklyn/some-package";
Note the install-dir
: the npm package knows the target directory where it will be installed to (as it defines it in the mimeo
mapping in their package.json
), so this must be used here as well.