var globule = require('./lib/globule');
globule.find([
'**/*.js',
'!**/*built.js',
'**/*.js',
'**/*.js',
'**/*.fail',
'**/q*.css',
'**/*.css',
], {
cwd: 'test',
})
.on('match', function(filepath) {
console.log('Match: %s', filepath);
})
.on('hit', function(data) {
console.log('Hit (%d/%d) %s\n', data.matches.length, data.dupes.length, data.pattern);
})
.on('miss', function(data) {
console.log('Miss %s\n', data.pattern);
})
.on('end', function(filepaths) {
console.log('Matches', filepaths);
});
Match: ctor_test.js
Match: fixtures/expand/js/bar.js
Match: fixtures/expand/js/foo.js
Match: globule_test.js
Match: mapping_test.js
Match: match_test.js
Match: path-custom_test.js
Hit (7/0) **/*.js
Match: globule_sync_test.built.js
Match: mapping_sync_test.built.js
Hit (2/7) **/*.js
Hit (0/9) **/*.js
Miss **/*.fail
Match: fixtures/expand/css/qux.css
Hit (1/0) **/q*.css
Match: fixtures/expand/css/baz.css
Hit (1/1) **/*.css
Matches [ 'ctor_test.js',
'fixtures/expand/js/bar.js',
'fixtures/expand/js/foo.js',
'globule_test.js',
'mapping_test.js',
'match_test.js',
'path-custom_test.js',
'globule_sync_test.built.js',
'mapping_sync_test.built.js',
'fixtures/expand/css/qux.css',
'fixtures/expand/css/baz.css' ]