简体   繁体   English

修改后的.bower.json文件未更新

[英]Modified .bower.json file not updating

When I download a package with bower it creates a .bower.json file in the package folder. 当我下载带有.bower.json的软件包时,它将在package文件夹中创建一个.bower.json文件。 When I modify the ignore list and run bower update it does not update however. 当我修改忽略列表并运行bower update它不会更新。

{
  "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? 有什么办法可以将这些文件放入我的软件包中?

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. 在Bower内部使用。 If you need to update the ignore list you should submit a pull request to the bower.json of the package in question. 如果需要更新忽略列表,则应向相关软件包的bower.json提交拉取请求。

Does Bower recognize a difference if the package folder contains both .bower.json and bower.json ? 如果package文件夹同时包含.bower.jsonbower.json Bower是否能够识别出差异? Which is the preferred? 哪个是首选?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM