Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ignore everything except a folder in bower

Is there a way to ignore everything except for a folder and it's contents for a bower library. I tried something like this but it didn't work

"ignore": [
  "./!(dist)"
]

My folder structure looks like this and I only want to distribute the dist folder.

/dist
  myLibrary.js
  myLibrary.min.js
/src
  ...
/node_modules
  ...
package.json
bower.json
...
like image 647
rob Avatar asked Dec 14 '14 17:12

rob


1 Answers

You should use the following ignore patterns:

"ignore": [
    "*",
    "!dist/",
    "!dist/*"
]

Notice you need the first pattern in order to first ignore everything.

like image 164
Dror Bereznitsky Avatar answered Oct 24 '22 08:10

Dror Bereznitsky