Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created March 20, 2016 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/7f25b9f24205984c5966 to your computer and use it in GitHub Desktop.
Save chuck0523/7f25b9f24205984c5966 to your computer and use it in GitHub Desktop.
var glob = require('glob')
function find(pattern) {
glob(pattern, function(err, files) {
if(err) {
console.log(err)
}
console.log(pattern)
console.log(files)
})
}
var pattern = "./src/**/*.js"
find(pattern)
pattern = "**/*.css"
find(pattern)
pattern = "**/*.html"
find(pattern)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment