Download the PHP package phug/split without Composer
On this page you can find all versions of the php package phug/split. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package split
Short Description Pug (ex-Jade) facade engine for PHP, HTML template engine structured by indentation
License MIT
Homepage https://phug-lang.com
Informations about the package split
Phug Split
Split is a tool to handle a mono-repo that can be downloaded as single package, multiple packages or both.
Install
Usage
Put composer.json files in sub-directory of a main package repository.
Check options with:
Check other commands with:
Passing GIT authentication via environment variables:
Export env var such as:
Example
phug-php/phug is a library that can be required either entirely with phug/phug
or as separated packages
phug/parser
, phug/compiler
, etc.
Each package is defined by a directory in src/Phug with a dedicated composer.json
file inside each of them.
Once you created a GitHuba (or other git publisher) repository, and registered each of them on packagist.org (you can submit repository with just a single composer.json file with basic infos, the split will insert the actual content later).
You can now simply run from the monorepository the vendor/bin/split update
or run this automatically from a hook or a job.
For instance phug/phug
uses GitHub Actions to trigger it automatically after each commit:
.github/workflows/split.yml
It relies on very few steps:
- Load PHP via
shivammathur/setup-php@v2
- Cache dependencies folder with
actions/cache@v2
to make the job faster (optional) -
Install
phug/split
with:(
mv
commands are optional, it's here to install onlyphug/split
as your other dependencies are not needed for this job) -
Run the
split update
commandHere we pass git credentials using the
git-credentials
as the job runner will not have an authenticaed git user able to push to your repositories.The authentication variable is you git username, followed by
:
, followed by an authentication token you can generate via the page https://github.com/settings/tokens (See documentation: Managing your personal access tokens).Don't put this clear token directly in the GitHub Action file, use a repository secret (See documentation: Encrypted secrets) to keep it private.