rob
rob

Reputation: 18513

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
...

Upvotes: 8

Views: 2624

Answers (1)

Dror Bereznitsky
Dror Bereznitsky

Reputation: 20376

You should use the following ignore patterns:

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

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

Upvotes: 22

Related Questions