Download the PHP package fivefifteen/piler without Composer
On this page you can find all versions of the php package fivefifteen/piler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fivefifteen/piler
More information about fivefifteen/piler
Files in fivefifteen/piler
Package piler
Short Description A CLI tool written in PHP that compiles and minifies JavaScript and CSS/SCSS files.
License MIT
Homepage https://github.com/fivefifteen/piler
Informations about the package piler
A Five Fifteen Project
Table of Contents
- Requirements
- Installation
- Usage
- Configuration
- Configuration via Composer
- Hot-Reloading
- Related Projects
- License Information
Requirements
- PHP 8.1 or above
- Composer
Installation
To a package (local)
To your system (global)
Usage
Options
[-n|--bail-on-overwrite]- Skips the confirmation prompt and bails if a file already exists in the output directory (takes priority over -y)[-c|--config]- Path to a config JSON file [default:pile.json][-d|--dry-run]- Don't actually write anything so that you can test the command[-e|--event-source]- Server accessible path to point EventSource to for hot-reloading (JS required)[-h|--help]- Show help[-i|--ignore-errors]- Ignore any errors that may occur and continue processing as much as possible[-p|--import-path...]- Additional directory path(s) to import from (fetcheddirectory added by default for built-in Fetcher support)[-m|--no-minify]- Minfy files [default:true][-o|--output...]- The directory path(s) or filename(s) to write to[-q|--quiet]- Run but don't output anything in the terminal[-s|--save]- Save list of compiled files to pile.json to easily run again later[-v|--verbosity]- Verbosity level [default:0][-V|--version]- Show version[-W|--watch]- Monitor defined files for changes and re-process when they are changed (enables -y)[-w|--working-directory]- Sets the working directory that all paths will be relative to [default:.][-y|--yes-to-overwrite]- Skips the confirmation prompt and overwrites files if they already exist in the output directory
Examples
Configuration
While Piler can be used out of the box without any configuration, a config file allows for better customization and easier package management.
Configuration via Composer
Piler also supports loading configuration options from a composer.json file, except for in this case Piler checks for it's key under the extra section like so:
Hot-Reloading
Piler can be configured to automatically reload your page whenever you make changes to your compiled files. This works by injecting a small piece of JavaScript into your code (which means at least one compiled JavaScript file is required).
To set this up, create a reloader.php file somewhere accessible by the front-end of your website and place the following contents in there:
Then just set the event source to the front-end accessible path of the file above either by setting the event_source setting in a config file (example above), or by using the --event-source option in the command line.
After that, simply use the --watch option and your page should then auto-reload when you make changes to your files.
Examples
Related Projects
- Fetcher - A package manager written in PHP that supports installing dependencies from GitHub, npm, custom URLs, and local file paths. 🐶
License Information
MIT. See the license.md file for more info.
All versions of piler with dependencies
adhocore/cli Version ^1.9
matthiasmullie/minify Version ^1.3
scssphp/scssphp Version ^2.0