Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tacoberu/composer-assets
Copies files from vendor to www directory. The list of files is stored in a json file.
https://github.com/tacoberu/composer-assets
Last synced: about 2 months ago
JSON representation
Copies files from vendor to www directory. The list of files is stored in a json file.
- Host: GitHub
- URL: https://github.com/tacoberu/composer-assets
- Owner: tacoberu
- License: mit
- Created: 2020-07-22T15:57:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-29T01:20:17.000Z (over 2 years ago)
- Last Synced: 2024-10-20T14:43:23.781Z (2 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Composer Assets
===============Copies files from vendor to www directory. The list of files is stored in a json file.
Installation
------------The recommended way to install is via Composer:
composer require tacoberu/composer-assets
Usage
-----```json
{
"require": {
"tacoberu/composer-assets": "*",
},
"scripts": {
"post-autoload-dump": [
"Taco\\ComposerScripts\\CopyAssetsToPublic::process"
]
},
"config": {
"www-dir": "public",
"assets-definition": "scripts/assets.json"
}
}
```Add list of files definition (vendor-src -> public-desc) in scripts/assets.json:
```json
{
"nette/forms/src/assets/netteForms.js": "assets/js/netteForms.js",
"nette/forms/examples/assets/logo.png": "assets/img/logo.png",
"../app/examples/assets/style-1.css": "assets/style.css",
"../app/examples/assets/style-2.css": "assets/style.css",
"../app/examples/assets/style-3.css": "assets/style.css"
}
```And run:
composer install