Skip to content

Prevent .js file from appearing in injector #420

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

Closed
mdedetrich opened this issue Aug 5, 2014 · 3 comments
Closed

Prevent .js file from appearing in injector #420

mdedetrich opened this issue Aug 5, 2014 · 3 comments
Labels

Comments

@mdedetrich
Copy link

Long story short, I am using https://github.com/madmimi/angular-foundation for my UI framework, and it requires the foundation.css file, but not the foundation.js file, to work.

So I added foundation as a dependency to my bower.json (so I can get the foundation.css file), and the angular-full-stack build automatically adds the foundation.js as a dependency. This causes my app to break due to conflicts.

Is there any way to prevent the injector from picking up a dependency in bower.json? In my case, I don't want foundation.js to automatically appear in the index.html which is generated by the build.

@kingcody
Copy link
Member

kingcody commented Aug 6, 2014

Hi @mdedetrich,
You should be able to add an ignorePath option to the injector:js task. You could potentially be so vague as to say:
ignorePath: '<%= yeoman.client %>/bower_components/**/foundation.js'

That is, if you didn't want to include any foundation.js file found anywhere in your bower_components folder.

Hope this helps

@JaKXz JaKXz added the question label Aug 6, 2014
@mdedetrich
Copy link
Author

This doesn't appear to work, its still appearing in my index.html, also tried putting it into the bowerInstall task, but with no luck

@DaftMonk
Copy link
Member

DaftMonk commented Aug 8, 2014

Add it to the bowerInstall exclude array. exclude: [... , /foundation.js/]

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

No branches or pull requests

4 participants