3.0.1 • Published 6 years ago

dir-glob v3.0.1

Weekly downloads
19,632,648
License
MIT
Repository
github
Last release
6 years ago

dir-glob Build Status

Convert directories to glob compatible strings

Install

$ npm install dir-glob

Usage

const dirGlob = require('dir-glob');

(async () => {
	console.log(await dirGlob(['index.js', 'test.js', 'fixtures']));
	//=> ['index.js', 'test.js', 'fixtures/**']

	console.log(await dirGlob(['index.js', 'inner_folder'], {cwd: 'fixtures'}));
	//=> ['index.js', 'inner_folder/**']

	console.log(await dirGlob(['lib/**', 'fixtures'], {
		files: ['test', 'unicorn']
		extensions: ['js']
	}));
	//=> ['lib/**', 'fixtures/**/test.js', 'fixtures/**/unicorn.js']

	console.log(await dirGlob(['lib/**', 'fixtures'], {
		files: ['test', 'unicorn', '*.jsx'],
		extensions: ['js', 'png']
	}));
	//=> ['lib/**', 'fixtures/**/test.{js,png}', 'fixtures/**/unicorn.{js,png}', 'fixtures/**/*.jsx']
})();

API

dirGlob(input, options?)

Returns a Promise<string[]> with globs.

dirGlob.sync(input, options?)

Returns a string[] with globs.

input

Type: string | string[]

Paths.

options

Type: object

extensions

Type: string[]

Append extensions to the end of your globs.

files

Type: string[]

Only glob for certain files.

cwd

Type: string[]

Test in specific directory.

@june21x/semantic-release-github-no-commentarchetype-librarycomponennentteasy-select-rnvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-image@clipchamp/semantic-release-gitairscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfdeneme323112@texttree/demo-bsa-reference-rcl@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-covid-sdkgql_din_mod@saeon/ol-react@saeon/quick-formmysql-formatreact-native-printer-brothers@byteinspire/clireact-native-shekhar-bridge-testcogoportutilsuncoded-connect@reversodev/oceanic-fleetlevibestliblevibestlib2levilibtest19levilibtest24levilibtest25levilibtest26levilibtest27levilibtest28levilibtest29wilscanner@khalitovadel/abstract-repository@oiti/documentoscopy-react-nativejs4cytoscape@mink-opn/build-tokensquoc-testreact-native-slider-kfunblock-block-save-variables@infinitebrahmanuniverse/nolb-dir@prodam/prodam-typescclibyarntest@saaspe/componentshyperpass-sdkexpand-react-bridgeopea-bootstraapluminos-ui-coresklif-ui-kitsklif-apits-handy@everything-registry/sub-chunk-1482jawwy-sdkjawwy_gamification_release@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-table@rabailriaz/hisaab-web-portalsklif-uimachinebeemrcapsrcf-tea-testnetreact-native-jawwy_samplelapture-ui-complaptureuigriffin-ui-libraryjualwkakokowawkzl2kzl3kzl4kzl5mamaowhalowpoeawgrtaudahjilha1jilha2jilha3jilha4jilha5mawalwlmdramml8487lpommlowolpomomo1momo2momo3momo4momo5nihil1
3.0.1

6 years ago

3.0.0

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.0.0

8 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago