Ignore everything except the folder in the gazebo

Is there a way to ignore everything except the folder and its contents for the 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 ... 
+7
javascript gitignore bower glob
source share
1 answer

You should use the following ignore patterns:

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

Note that you need the first template to ignore everything first.

+22
source share

All Articles