inpsyde/composer-assets-compiler
最新稳定版本:3.0.1
Composer 安装命令:
composer require inpsyde/composer-assets-compiler
包简介
Composer plugin that installs and compile frontend dependencies for installed Composer packages based on configuration.
README 文档
README
What is this
A Composer plugin that automatically "compiles" frontend assets (js, css, etc.) for packages installed via Composer.
A quick example
Let's assume we have a website project having a composer.json that looks like this:
{
"name": "acme/my-project",
"require": {
"acme/foo": "^1",
"acme/bar": "^2",
"inpsyde/composer-assets-compiler": "^3"
},
"extra": {
"composer-asset-compiler": { "auto-run": true }
}
}
And then suppose that acme/foo's composer.json looks like this:
{
"name": "acme/foo",
"extra": {
"composer-asset-compiler": "gulp"
}
}
and acme/bar's composer.json looks like this:
{
"name": "acme/bar",
"extra": {
"composer-asset-compiler": "build"
}
}
When we'll install the project with Composer, the following happens:
- Composer installs the three required packages
- Immediately after that, the plugin executes and:
- the plugin looks for all installed packages (including transitive dependencies) that have a
composer-asset-compilerconfiguration, finding"acme/foo"and"acme/bar" - moves to
"acme/foo"installation folder, and executesnpm install && npm run gulp - moves to
"acme/bar"installation folder, and executesnpm install && npm run build
- the plugin looks for all installed packages (including transitive dependencies) that have a
At the end of the process, we have a project with the dependencies installed, and their assets processed.
The example above is the simplest use case, but the plugin has many possible configurations and advanced use cases.
Documentation
- Introduction
- Compiling Assets
- Script
- Dependencies
- Package Manager
- Pre-compilation
- Hash and Lock
- Execution Mode
- Configuration File
- Packages Configuration in Root
- Verbosity
- Isolated Cache
- Parallel Assets Processing
- Configuration Cheat-Sheet
- CLI Parameters
- Environment Variables
Copyright and License
Good news, this library is free for everyone! Since it's released under the MIT License you can use it free of charge on your personal or commercial website.
统计信息
- 总下载量: 261.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 25
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-08-12