mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
21 lines
748 B
TypeScript
21 lines
748 B
TypeScript
import expand = require("glob-expand");
|
|
|
|
expand({ filter: 'isFile', cwd: '../' }, ['**/*.*', '!exclude/these/**/*.*']);
|
|
// returns all files in cwd ['file1', 'file2',...] but excluding
|
|
// those under directory 'exclude/these'
|
|
|
|
// These are the same
|
|
expand({ cwd: '../..' }, ['**/*.*', '!node_modules/**/*.*']);
|
|
expand({ cwd: '../..' }, '**/*.*', '!node_modules/**/*.*');
|
|
|
|
// These are the same too:
|
|
expand({}, ['**/*.*', '!**/*.js']);
|
|
expand({}, '**/*.*', '!**/*.js');
|
|
expand(['**/*.*', '!**/*.js']);
|
|
expand('**/*.*', '!**/*.js');
|
|
|
|
// Using Regular Expressions:
|
|
expand('**/*.js', /.*\.(coffee\.md|litcoffee|coffee)$/i, '!DRAFT*.*');
|
|
// -> returns all `.js`, `.coffee`, `.coffee.md` & `.litcoffee` files,
|
|
// excluding those starting with 'DRAFT'
|