phpgt / build
Client-side build system for PHP projects.
Fund package maintenance!
PhpGt
Installs: 2 930
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 15
Requires
- php: >=7.4
- ext-json: *
- composer/semver: v3.*
- phpgt/cli: ^v1.3.0
- phpgt/sync: ^1.3.0
- webmozart/glob: v4.4.*
Requires (Dev)
- phpmd/phpmd: ^2.13
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.1
- squizlabs/php_codesniffer: ^3.7
- dev-master
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.1
- v1.0.0
- v0.2.1.x-dev
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-dependabot/composer/phpstan/phpstan-1.10.6
- dev-dependabot/composer/phpunit/phpunit-9.6.5
- dev-dependabot/composer/webmozart/glob-4.6.0
- dev-dependabot/composer/phpstan/phpstan-0.12.85
- dev-circleci
- dev-release-0.2.0
- dev-27-cli
- dev-release-0.1.2
- dev-release-0.1.1
- dev-release-0.1.0
This package is auto-updated.
Last update: 2024-11-19 22:46:52 UTC
README
This project provides a system for defining and running client-side build processes automatically, using tools already installed by your favourite client-side dependency manager.
Example usage
An example build.json
below shows three different usages:
npm
has been used to install babel into the node_modules directory. The command to run is thebabel
binary within the node_modules directory. The command will execute whenever a*.es6
file changes within the script directory.sass
has been installed to the system. Thesass
command is available on the environment PATH, and the developer has stated that at least version 3.5 is required for the build. The command will execute whenever a*.scss
file changes within the style directory.- A custom PHP script is called whenever any HTML or PHP file is edited in the page directory. This assumes that the command
vendor/bin/sitemap
is installed via a composer package.
build.json
:
{ "script/**/*.es6": { "name": "Babel transpile", "command": "./node_modules/.bin/babel", "args": "script/main.js -o www/script.js", "require": { "node": "^8.4", "@command": "^6.0" } }, "style/**/*.scss": { "name": "Sass compilation", "command": "sass", "args": "style/main.scss www/style.css", "require": { "@command": ">=3.5" } }, "page/**/*.{html|php}": { "name": "Sitemap generation", "command": "php vendor/bin/sitemap", "args": "src/page www/sitemap.xml" } }
Not a dependency manager
This library assumes the configuration of the system is already configured.
The primary objective is to provide a client-side build system that is automatically configured for PHP projects, leaving the configuration of the system down to the developer's choice of client-side dependency management software.
Features at a glance
- One-off builds
- Background builds (watching the matching files and re-building where necessary)
- Bring your own client-side dependency manager