Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

override main_files #160

Open
rstormsf opened this issue Aug 8, 2015 · 6 comments
Open

override main_files #160

rstormsf opened this issue Aug 8, 2015 · 6 comments

Comments

@rstormsf
Copy link

rstormsf commented Aug 8, 2015

main_files only adds some files, would be great to override it

@SergeyKishenin
Copy link
Collaborator

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

at Ruby DSL Configuration?

@rstormsf
Copy link
Author

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.

@SergeyKishenin
Copy link
Collaborator

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

?

@rstormsf
Copy link
Author

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.

@rstormsf
Copy link
Author

One of the reasons why - is because

  1. 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 in vendor folder

@SergeyKishenin
Copy link
Collaborator

I'll reopen for now until I have more free time or someone provide a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants