Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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