kriss / foxy-yii2-convert
Installs: 2 905
Dependents: 2
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 3
Open Issues: 0
Type:composer-plugin
Requires
- php: >=5.6
- composer-plugin-api: ^1.1||^2.0
- foxy/foxy: ^1.0
Requires (Dev)
- composer/composer: ^1.10|^2.2
README
covert Yii2 npm-asset
or bower-asset
to package.json
, so that Foxy can install.
install
composer require kriss/foxy-yii2-convert -vvv
usage
- add
provide
tocomposer.json
to skip installnpm-asset
orbower-asset
like this:
{ "provide": { "bower-asset/bootstrap": "*", "bower-asset/jquery": "*", "bower-asset/inputmask": "*", "bower-asset/punycode": "*", "bower-asset/yii2-pjax": "*", "npm-asset/wangeditor": "*", "npm-asset/webuploader": "*", "bower-asset/typeahead.js": "*" }, }
-
remove composer-asset-plugin or asset-packagist if you used in project
-
composer install
-
chage Yii2 npm and bower aliase
like this
'aliases' => [ '@bower' => '@project/node_modules', '@npm' => '@project/node_modules', ],
FAQ
Q: If one package I dont want to install view npm?
A: Like almasaeed2010/adminlte, it can be installed by composer, you can config this in composer.json like:
"config": { "foxy": { "enabled": true, "manager": "yarn", "enable-packages": { "almasaeed2010/adminlte": false, // this tip "*": true // must be added to the last } } },
Q: If one package has
package.json
,and just use for develop?
A: Like kartik-v/dependent-dropdown, you can config this in composer.json like:
"config": { "foxy": { "enabled": true, "manager": "yarn", "enable-packages": { "kartik-v/dependent-dropdown": false, // this tip "*": true // must be added to the last } } },
Q: If one package is dont have same npm package name in bower?