arcanedev / laravel-assets
This package allows you to manage multiple assets
Requires
- php: >=7.1.3
- ext-json: *
- arcanedev/support: ~4.4.0
Requires (Dev)
- orchestra/testbench: ~3.7.0
- phpunit/phpcov: ~5.0
- phpunit/phpunit: ~7.0
This package is auto-updated.
Last update: 2024-10-28 10:17:15 UTC
README
By ARCANEDEV©
This Assets package allows you to structure your assets into multiple workspaces (like frontoffice + backoffice + components + packages…).
IMPORTANT: This package is a helper like php artisan preset
built on top of the Yarn's workspaces feature.
Features
- A very flexible assets management.
- Easy setup & configuration.
- Well documented & IDE Friendly.
- Made with ❤️ & ☕.
Table of contents
Description
This package allows you to generate a structure like this (and it's customizable)
laravel-projet
|--app
|--assets
| |--laravel (frontoffice with dependencies: bootstrap + jquery + popper.js + vue + axios)
| |--admin (backoffice with dependencies: tailwind + vue + axios)
| |--alert-component (shared vue component)
| ...
|--config
...
The laravel-mix
will generate the frontoffice assets [laravel]
(css/app.css, js/app.js), same as the backoffice assets [admin]
(css/admin.css, js/admin.js).
And both [laravel]
and [admin]
has their own package.json
file (+ their dependencies) and also can re-use the shared component [alert-component]
(for example) as a dependency.
For example:
assets/laravel/package.json
{ "private": true, "name": "@assets/laravel", "version": "1.0.0", "devDependencies": { "axios": "^0.18", "bootstrap": "^4.0.0", "jquery": "^3.2", "laravel-mix": "^2.0", "lodash": "^4.17.5", "popper.js": "^1.12", "vue": "^2.5.17", "@assets/alert-component": "~1.0.0" } }
assets/laravel/js/app.js
//... @require('@assets/alert-component'); //...
assets/laravel/sass/app.scss
//... @require('~@assets/alert-component/sass/style.scss'); //...
Contribution
Any ideas are welcome. Feel free to submit any issues or pull requests, please check the contribution guidelines.
Security
If you discover any security related issues, please email arcanedev.maroc@gmail.com instead of using the issue tracker.