定制 koala-framework/composer-extra-assets 二次开发

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

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

koala-framework/composer-extra-assets

Composer 安装命令:

composer require koala-framework/composer-extra-assets

包简介

Composer Plugin for installing Assets using native npm/bower

README 文档

README

This Composer plugin installs assets using native npm/bower. Not only the root package can have dependencies.

Npm packages will be installed in package folder, bower will be installed in root - with all dependencies merged.

Introduction

Example usage

composer.json

"require": {
    "koala-framework/composer-extra-assets": "~1.1"
},
"extra": {
    "require-npm": {
        "grunt": "0.4.*"
    },
    "require-bower": {
        "jquery": "*"
    },
    "require-dev-bower": {
        "qunit": "*"
    },
    "require-dev-npm": {
    }
}

Bower dependencies

Bower dependencies will be installed in the vendor/bower_components directory.

NPM dependencies

NPM dependencies will be installed in the node_modules directory of the package that requires the dependency. Some NPM packages provide binary files (for instance gulp and grunt).

NPM binaries will be exposed in the vendor/bin directory if the NPM dependency is declared in the root Composer package.

If you are writing a package and want a NPM package to be available in the node_modules directory of Composer's root (instead of the node_modules directory of your package), you can add the expose-npm-packages attribute to the composer extra session of your package:

 "require": {
     "koala-framework/composer-extra-assets": "~1.1"
 },
 "extra": {
     "require-npm": {
         "gulp": "*"
     },
     "expose-npm-packages": true
 }

Generated files

This plugin will automatically generate 3 files: .bowerrc, bower.json, package.json/

Unless you have special requirements, you can ignore those 3 files in your VCS. If you are using GIT, add this to your .gitignore:

.gitignore

vendor/
.bowerrc
bower.json
package.json

Lock

This plugin will generate a file named composer-extra-assets.lock which can be used just like composer.lock. Put it under version control if you want to be able to install the exact same dependencies.

Warning

This plugins removes (and re-installs) the complete node_modules folder. Any changes will be lost.

统计信息

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

GitHub 信息

  • Stars: 42
  • Watchers: 17
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2014-08-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固