Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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

```