Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Option to avoid overwriting customized paths #34

Open
andyinabox opened this issue Jan 26, 2015 · 1 comment
Open

Option to avoid overwriting customized paths #34

andyinabox opened this issue Jan 26, 2015 · 1 comment

Comments

@andyinabox
Copy link

It would be nice if there was a simple toggle option that avoids overwriting existing paths in the requirejs config file.

For instance: some packages are setup so that the "main" script is not what I want (say it's a minified version of the script instead of source, or it's an index.js file that only works with node.js), but grunt-bower-requirejs automatically sets that path. Even if I correct the path, every time I update my bower dependencies it gets overwritten with the wrong path.

I recognize that I could explicitly fix this with the exclude option, but a more desired behavior would be for the task to assume that if there is already a path for a certain module in the config, that it should leave it alone.

Maybe if there were a simple overwrite option that defaulted to true, but when set to false would leave existing paths?

@bezoerb
Copy link
Collaborator

bezoerb commented Jan 26, 2015

With this configuration you would run into unexpected conflicts when paths of installed bower components change after updating a package. In this case it should be the desired behavior for this task to overwrite the path.
I would prefer the exclude option for manually changed module paths but maybe combining the overwrite option with a check for file existence could be a way to go.

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

Successfully merging a pull request may close this issue.

2 participants