定制 inpsyde/composer-assets-compiler 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

inpsyde/composer-assets-compiler

Composer 安装命令:

composer require inpsyde/composer-assets-compiler

包简介

Composer plugin that installs and compile frontend dependencies for installed Composer packages based on configuration.

README 文档

README

PHP Static Analysis PHP Unit Tests

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:

  1. Composer installs the three required packages
  2. Immediately after that, the plugin executes and:
    1. the plugin looks for all installed packages (including transitive dependencies) that have a composer-asset-compiler configuration, finding "acme/foo"and "acme/bar"
    2. moves to "acme/foo" installation folder, and executes npm install && npm run gulp
    3. moves to "acme/bar" installation folder, and executes npm install && npm run build

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

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.

inpsyde/composer-assets-compiler 适用场景与选型建议

inpsyde/composer-assets-compiler 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 294.03k 次下载、GitHub Stars 达 24, 最近一次更新时间为 2020 年 08 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 inpsyde/composer-assets-compiler 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 inpsyde/composer-assets-compiler 我们能提供哪些服务?
定制开发 / 二次开发

基于 inpsyde/composer-assets-compiler 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 294.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 24
  • 点击次数: 30
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 24
  • Watchers: 8
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-12