bower-rails
bower-rails copied to clipboard
override main_files
main_files only adds some files, would be great to override it
Have you seen:
# via argument
asset "moment", "2.10.1", main_files: ["./locale/en-gb.js"]
# or in block
asset "moment", "2.10.1" do
main_files [
"./locale/en-gb.js",
"./locale/fr.js",
"./locale/lv.js"
]
end
Yes, I have seen this and it doesn't seem like you read what I said. Main_files only adds files to current main object in bower.json For example, if I had something in my main object by default and then I provide via Bowerfile, it doesn't override it, it will keep whatever is already declared in main object and add what I provided. This is inconvenient behaviour.
Well, your issue description is quiet poor, so maybe I missed something. So you want to have an option that will either merge main files declared by you, or override, like
asset "moment", "2.10.1" do
main_files [ "./locale/lv.js" ], override: true # will keep only ./locale/lv.js file
end
?
I'm sorry if I didn't make it clear at first. Yes, that override: true
flag would be great to have.
You got the idea right now.
One of the reasons why - is because
- when I want to completely ignore package to be installed in
bower_components
folder, but it will be done because it's dependency of bower package. Things like jquery that I load in rails assets pipeline. 2)Maintainers are frequently include more stuff in main object than needed - and I have no control over those files and I don't want it to be deployed in production since it is invendor
folder
I'll reopen for now until I have more free time or someone provide a PR.