Modified .bower.json file not updating

十年热恋 提交于 2019-12-23 04:47:50

问题


When I download a package with bower it creates a .bower.json file in the package folder. When I modify the ignore list and run bower update it does not update however.

{
  "name": "less",
  "version": "1.6.3",
  "main": "./dist/less-1.6.3.js",
  "ignore": [
    "**/.*",
    "test",
    "*.md",
    "LICENSE",
    "Gruntfile.js",
    "package.json",
    "bower.json"
  ],
  "homepage": "https://github.com/less/less",
  "_release": "1.6.3",
  "_resolution": {
    "type": "version",
    "tag": "v1.6.3",
    "commit": "0cfd753e3750ff1ee4c54e09d10ea1a633b0ce89"
  },
  "_source": "git://github.com/less/less.git",
  "_target": "1.6.3",
  "_originalSource": "less"
}

is changed to

{
  "name": "less",
  "version": "1.6.3",
  "main": "./dist/less-1.6.3.js",
  "ignore": [
    "LICENSE",
    "Gruntfile.js",
    "package.json",
    "bower.json"
  ],
  "homepage": "https://github.com/less/less",
  "_release": "1.6.3",
  "_resolution": {
    "type": "version",
    "tag": "v1.6.3",
    "commit": "0cfd753e3750ff1ee4c54e09d10ea1a633b0ce89"
  },
  "_source": "git://github.com/less/less.git",
  "_target": "1.6.3",
  "_originalSource": "less"
}

Is there any way to get these files in my package?


回答1:


There's a reason it's prefixed with a dot and hidden. You're not supposed to touch it. It's for use internally in Bower. If you need to update the ignore list you should submit a pull request to the bower.json of the package in question.




回答2:


Does Bower recognize a difference if the package folder contains both .bower.json and bower.json ? Which is the preferred?



来源:https://stackoverflow.com/questions/21687412/modified-bower-json-file-not-updating

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!