https://github.com/webdevlabs/webphpack
WebPHPack is a simple php alternative to webpack for auto combining multiple JS and CSS files into single files.
https://github.com/webdevlabs/webphpack
php-library webpack webphpack
Last synced: 5 months ago
JSON representation
WebPHPack is a simple php alternative to webpack for auto combining multiple JS and CSS files into single files.
- Host: GitHub
- URL: https://github.com/webdevlabs/webphpack
- Owner: webdevlabs
- License: mit
- Created: 2017-06-03T11:46:09.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-16T17:30:16.000Z (over 8 years ago)
- Last Synced: 2025-08-12T01:26:00.949Z (11 months ago)
- Topics: php-library, webpack, webphpack
- Language: PHP
- Homepage:
- Size: 195 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebPHPack
#### WebPHPack is a simple php alternative to webpack for automatic concatenation of multiple JavaScript and CSS files into single files.
This library replaces the style/script tags from the input html source code and returns plain html code ready for output.
Loading is done asynchronously for both javascript/css.
**Added HTTP2 Push support.**
### Usage
```
$webphpack = new WebPHPack($htmlsource);
$webphpack->caching = true;
$webphpack->httpush = true;
$webphpack->combineJS();
$webphpack->combineCSS();
$webphpack->output();
```
or nested
```
$webphpack = new WebPHPack($htmlsource);
$newHTMLsource = $webphpack->combineJS()->combineCSS()->output();
```