Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created April 12, 2016 20:39
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/2e4b810930e2c89a05b282b1f686734b to your computer and use it in GitHub Desktop.
Save chuck0523/2e4b810930e2c89a05b282b1f686734b to your computer and use it in GitHub Desktop.
var glob = require('glob')
var allFiles = glob('**/*.elm', function(err, matches) {
console.log(matches) // [ ...(huge ammount of elm files) ]
})
var limitedFiles = glob('**/*.elm', {
ignore: 'elm-stuff/**/*.elm'
}, function(err, matches) {
console.log(matches) // [ 'Main.elm', 'Todo.elm', 'TodoList.elm' ]
})
var moreLimitedFiles = glob('**/*.elm', {
ignore: ['elm-stuff/**/*.elm', 'Main.elm']
}, function(err, matches) {
console.log(matches) // [ 'Todo.elm', 'TodoList.elm' ]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment