Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What to ignore in bower.json

I have a library that I'm developing and I'm publishing it to bower. Right now I'm ignoring everything except genie.js (the library) and genie.min.js. Is there value in having the README.md or the travis build file or the demo files or anything else? It seems to me that the reason someone adds your component to their project is so they can use it in their product and they don't want their file system polluted, am I wrong?

like image 539
kentcdodds Avatar asked Dec 17 '13 14:12

kentcdodds


1 Answers

You're right, just the minimum. I would go a step further and drop the minified file, which is the best practise in Bower, as users are most likely using a build system and having an additional minified file is just wasting space.

You can easily ignore everything but one file by using globbing in the "ignore" property in bower.json like this:

"ignore": ["./!(genie.js)"]
like image 136
Sindre Sorhus Avatar answered Nov 09 '22 11:11

Sindre Sorhus