krissss / foxy-yii2-convert

covert Yii2 `npm-asset` or `bower-asset` to `package.json`, so that Foxy can install.
https://github.com/fxpio/foxy
8 stars 3 forks source link

Not macthed asset in bower and npm #3

Closed krissss closed 4 years ago

krissss commented 4 years ago

swagger-ui in bower is match swagger-ui-dist in npm.

swagger-ui in npm is another package.

so bower-asset/swagger-ui is equal npm-asset/swagger-ui-dist

krissss commented 4 years ago

solve by step:

  1. composer.json add config
"config": {
  "foxy-yii2-convert": {
    "target-map": {
      "bower-asset/swagger-ui": "npm-asset/swagger-ui-dist"
    }
  }
}
  1. reinstall composer package

Remove first if already installed.

You will see node_modules\swagger-ui-dist in your project

  1. Change alias in your project if used
'aliases' => [
  '@bower/swagger-ui/dist' => '@npm/swagger-ui-dist'
],
krissss commented 3 years ago

yiisoft/yii2-jui:

"foxy-yii2-convert": {
  "target-map": {
    "bower-asset/jquery-ui": "npm-asset/components-jqueryui"
  }
},
'aliases' => [
  '@bower/jquery-ui' => '@npm/components-jqueryui'
],