Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drhino/phpackage-json
Bundle Javascript & Stylesheets from package.json (Yarn) with PHP.
https://github.com/drhino/phpackage-json
bundle bundle-css bundle-fonts bundle-javascript bundle-js bundle-stylesheets css javascript js minifier minify optimalisation optimization performance php phpackage-json productivity stylesheet stylesheets yarn
Last synced: 6 days ago
JSON representation
Bundle Javascript & Stylesheets from package.json (Yarn) with PHP.
- Host: GitHub
- URL: https://github.com/drhino/phpackage-json
- Owner: drhino
- License: mit
- Created: 2017-08-02T22:59:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-27T04:16:45.000Z (about 7 years ago)
- Last Synced: 2024-09-21T18:49:28.979Z (about 2 months ago)
- Topics: bundle, bundle-css, bundle-fonts, bundle-javascript, bundle-js, bundle-stylesheets, css, javascript, js, minifier, minify, optimalisation, optimization, performance, php, phpackage-json, productivity, stylesheet, stylesheets, yarn
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phpackage-json
Bundle Javascript & Stylesheets from package.json (Yarn) with PHP.```
$ composer require wbadrh/phpackage-json
```
Example: https://github.com/wbadrh/phpackage-json-example```php
require __DIR__ . '/../vendor/autoload.php';$assets = new PHPackage(
__DIR__ . '/../package.json', // yarn package
__DIR__ . '/../node_modules/', // yarn vendor
[
// custom css
__DIR__ . '/src/css/*' // user stylesheets
],
[
// custom js
__DIR__ . '/src/js/*' // user javascript
],
[
// exclude
'index.js',
]
);$assets->fonts(__DIR__ . '/fonts');
``````html
```
```html
```