{"id":22264303,"url":"https://github.com/fivefifteen/piler","last_synced_at":"2026-02-14T07:31:17.171Z","repository":{"id":266156524,"uuid":"897563625","full_name":"fivefifteen/piler","owner":"fivefifteen","description":"A CLI tool written in PHP that compiles and minifies JavaScript and CSS/SCSS files. 🤖","archived":false,"fork":false,"pushed_at":"2026-02-05T19:02:34.000Z","size":58,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-06T04:19:19.486Z","etag":null,"topics":["build","compiler","concat","files","frontend","javascript","php","scss","tool"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fivefifteen.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-02T21:04:41.000Z","updated_at":"2026-02-05T19:02:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"da7a5f0e-3e41-4fb5-934a-f688fb3eb493","html_url":"https://github.com/fivefifteen/piler","commit_stats":null,"previous_names":["fivefifteen/piler"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/fivefifteen/piler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivefifteen%2Fpiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivefifteen%2Fpiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivefifteen%2Fpiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivefifteen%2Fpiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fivefifteen","download_url":"https://codeload.github.com/fivefifteen/piler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivefifteen%2Fpiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29439487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","compiler","concat","files","frontend","javascript","php","scss","tool"],"created_at":"2024-12-03T10:08:29.627Z","updated_at":"2026-02-14T07:31:17.154Z","avatar_url":"https://github.com/fivefifteen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  ![Piler](./assets/piler.png)\n\n  # Piler\n\n  A CLI tool written in PHP that compiles and minifies JavaScript and CSS/SCSS files.\n\n  [![packagist package version](https://img.shields.io/packagist/v/fivefifteen/piler.svg?style=flat-square)](https://packagist.org/packages/fivefifteen/piler)\n  [![packagist package downloads](https://img.shields.io/packagist/dt/fivefifteen/piler.svg?style=flat-square)](https://packagist.org/packages/fivefifteen/piler)\n  [![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/fivefifteen/piler?style=flat-square)](https://github.com/fivefifteen/piler)\n  [![license](https://img.shields.io/github/license/fivefifteen/piler.svg?style=flat-square)](https://github.com/fivefifteen/piler/blob/main/license.md)\n\n  \u003ca href=\"https://asciinema.org/a/693243\" target=\"_blank\"\u003e\u003cimg src=\"https://asciinema.org/a/693243.svg\" width=\"75%\" /\u003e\u003c/a\u003e\n\n  \u003ca href=\"https://fivefifteen.com\" target=\"_blank\"\u003e\u003cimg src=\"./assets/fivefifteen.png\" /\u003e\u003cbr /\u003e\u003cb\u003eA Five Fifteen Project\u003c/b\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n\n## Table of Contents\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration](#configuration)\n    - [Configuration via Composer](#configuration-via-composer)\n    - [Hot-Reloading](#hot-reloading)\n- [Related Projects](#related-projects)\n- [License Information](#license-information)\n\n\n## Requirements\n\n- PHP 8.1 or above\n- Composer\n\n\n## Installation\n\n### To a package (local)\n\n```\ncomposer require-dev fivefifteen/piler\n./vendor/bin/piler --version\n```\n\n### To your system (global)\n\n```sh\ncomposer global require fivefifteen/piler\npiler --version\n```\n\n\n## Usage\n\n```sh\npiler [options...] [input...]\n```\n\n\n##### Options\n\n - `[-n|--bail-on-overwrite]` - Skips the confirmation prompt and bails if a file already exists in the output directory (takes priority over -y)\n - `[-c|--config]` - Path to a config JSON file [default: `pile.json`]\n - `[-d|--dry-run]` - Don't actually write anything so that you can test the command\n - `[-e|--event-source]` - Server accessible path to point EventSource to for hot-reloading (JS required)\n - `[-h|--help]` - Show help\n - `[-i|--ignore-errors]` - Ignore any errors that may occur and continue processing as much as possible\n - `[-p|--import-path...]` - Additional directory path(s) to import from (`fetched` directory added by default for built-in [Fetcher](https://github.com/fivefifteen/fetcher) support)\n - `[-m|--no-minify]` - Minfy files [default: `true`]\n - `[-o|--output...]` - The directory path(s) or filename(s) to write to\n - `[-q|--quiet]` - Run but don't output anything in the terminal\n - `[-s|--save]` - Save list of compiled files to pile.json to easily run again later\n - `[-v|--verbosity]` - Verbosity level [default: `0`]\n - `[-V|--version]` - Show version\n - `[-W|--watch]` - Monitor defined files for changes and re-process when they are changed (enables -y)\n - `[-w|--working-directory]` - Sets the working directory that all paths will be relative to [default: `.`]\n - `[-y|--yes-to-overwrite]` - Skips the confirmation prompt and overwrites files if they already exist in the output directory\n\n\n##### Examples\n\n```sh\n# Process files listed in the `compile` section of a custom config file\npiler --config content/themes/my-theme/compile.json\n\n# Minify all .js files in the `scripts` directory (minified files will be saved as *.min.js in the scripts directory)\npiler scripts/*.js\n\n# Minify all .js files in the `scripts` directory and save the minified files to the build directory\npiler scripts/*.js --output build\n\n# Minify all .js files in the `scripts` directory and save the minified files with a customized prefix to the build directory\npiler scripts/*.js --output build/compiled-{name}.min.js\n\n# Compile all .scss files in the `styles` directory to minified css (minified files will be saved as *.min.css in the styles directory)\npiler styles/*.scss\n\n# Compile all .scss files in the `styles` directory to minified css and save the files to the build directory\npiler styles/*.scss --output build\n\n# Compile all .scss and .css files in the `styles` directory to minified css and save the files with a customized prefix to the build directory\npiler styles/*.{scss,css} --output build/compiled-{name}.min.css\npiler styles/*.{scss,css} scripts/*.js -o build/compiled-{name}.min.css # same as above since output is specifically set to .css so .js files will be ignored\n\n# Minify all .js files in the `scripts` directory and compile all .scss and .css files in the `styles` directory, put all minified .js and .css files in the build directory with a custom prefix\npiler styles/*.{scss,css} scripts/*.js --output build/compiled-{name}.min.{ext}\npiler styles/*.{scss,css} scripts/*.js --output build/compiled-{name}.min.css --output build/compiled-{name}.min.js # same as above\npiler styles/*.{scss,css} scripts/*.js -o build/compiled-{name}.min.css -o build/compiled-{name}.min.js # same as above\n\n# Concat and minify all .js files in the `scripts` directory and concat and compile all .scss and .css files in the `styles` directory, put all minified .js and .css files in the build directory with a custom prefix (when concat option is used, {name} will become 'script' for js and 'style' for css. use {names} for plural)\npiler styles/*.{scss,css} scripts/*.js --output build/compiled-{name}.min.{ext} # will end up with a compiled-script.min.js and a compiled-style.min.css\npiler styles/*.{scss,css} scripts/*.js -o build/compiled-script.min.js -o build/compiled-style.min.js # same as above\npiler styles/*.{scss,css} scripts/*.js --output build/compiled-{names}.min.{ext} # will end up with a compiled-scripts.min.js and a compiled-styles.min.css\npiler styles/*.{scss,css} scripts/*.js -o build/compiled-scripts.min.js -o build/compiled-styles.min.js # same as above\n\n# Concat and minify all .js files in the `scripts/src` and `scripts/vendor` directories into one minified .js file in the build directory\npiler scripts/src/*.js scripts/vendor/*.js -o build/compiled-scripts.min.js\n\n# Concat and minify all .js files in the `scripts/src` and `scripts/vendor` directories into two minified .js files in the build directory\npiler scripts/src/*.js scripts/vendor/*.js -o build/compiled-scripts.min.js -o build/vendor-scripts.min.js\n```\n\n\n## Configuration\n\nWhile Piler can be used out of the box without any configuration, a config file allows for better customization and easier package management.\n\n```json\n{\n  \"piler\": {\n    \"config\": {\n      \"config_path\": \"compile.json\",\n      \"event_source\": \"/reloader.php\",\n      \"import_paths\": [\"fetched\"],\n      \"minify\": true,\n      \"yes_to_overwrite\": true\n    },\n    \"compile\": {\n      \"style.css\": \"scss/style.scss\",\n      \"js/scripts.min.js\": [\n        \"bluzky/nice-select2/dist/js/nice-select2.js\",\n        \"js/src/*.js\"\n      ]\n    }\n  }\n}\n```\n\n\n### Configuration via Composer\n\nPiler 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:\n\n```json\n{\n  \"name\": \"username/package\",\n  \"version\": \"0.0.1\",\n  \"require-dev\": {\n    \"fivefifteen/piler\": \"*\"\n  },\n  \"scripts\": {\n    \"build\": \"./vendor/bin/piler -y\"\n  },\n  \"extra\": {\n    \"piler\": {\n      \"config\": {\n        \"config_path\": \"compile.json\",\n        \"event_source\": \"/reloader.php\",\n        \"import_paths\": [\"fetched\"],\n        \"minify\": true,\n        \"yes_to_overwrite\": true\n      },\n      \"compile\": {\n        \"style.css\": \"scss/style.scss\",\n        \"js/scripts.min.js\": [\n          \"bluzky/nice-select2/dist/js/nice-select2.js\",\n          \"js/src/*.js\"\n        ]\n      }\n    }\n  }\n}\n```\n\n\n### Hot-Reloading\n\nPiler 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).\n\nTo set this up, create a `reloader.php` file somewhere accessible by the front-end of your website and place the following contents in there:\n\n```php\n\u003c?php\nrequire_once('./vendor/autoload.php'); // Update this to the path of your project's composer autoload.php\nnew \\Piler\\Reloader('./pile.json'); // Update this to the path of your projects pile.json\n?\u003e\n```\n\nThen 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.\n\nAfter that, simply use the `--watch` option and your page should then auto-reload when you make changes to your files.\n\n#### Examples\n\n```sh\npiler --watch --event-source \"/reloader.php\"\npiler -We \"reloader.php\" # same as above\n\n# The --event-source option isn't needed if `event_source` is set in the config file\npiler --watch\npiler -W # same as above\n```\n\n## Related Projects\n\n - [Fetcher](https://github.com/fivefifteen/fetcher) - A package manager written in PHP that supports installing dependencies from GitHub, npm, custom URLs, and local file paths. 🐶\n\n\n## License Information\n\nMIT. See the [license.md file](license.md) for more info.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffivefifteen%2Fpiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffivefifteen%2Fpiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffivefifteen%2Fpiler/lists"}