Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/becklyn/mimeo
Mimeo: copy (static) assets from NPM packages into your symfony project.
https://github.com/becklyn/mimeo
php symfony symfony-bundle
Last synced: 26 days ago
JSON representation
Mimeo: copy (static) assets from NPM packages into your symfony project.
- Host: GitHub
- URL: https://github.com/becklyn/mimeo
- Owner: Becklyn
- License: bsd-3-clause
- Created: 2019-03-26T15:31:42.000Z (almost 6 years ago)
- Default Branch: 1.x
- Last Pushed: 2022-02-17T15:15:24.000Z (almost 3 years ago)
- Last Synced: 2024-12-15T23:47:50.448Z (about 1 month ago)
- Topics: php, symfony, symfony-bundle
- Language: PHP
- Size: 28.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Mimeo Bundle
============
Mimeo: copy (static) assets from NPM packages into your symfony project.The name is inspired by the short name of a [mimeograph](https://en.wikipedia.org/wiki/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:
```scss
$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:
```scss
$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.