Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # dir-glob [![Build Status](https://travis-ci.org/kevva/dir-glob.svg?branch=master)](https://travis-ci.org/kevva/dir-glob)
  2. > Convert directories to glob compatible strings
  3. ## Install
  4. ```
  5. $ npm install dir-glob
  6. ```
  7. ## Usage
  8. ```js
  9. const dirGlob = require('dir-glob');
  10. (async () => {
  11. console.log(await dirGlob(['index.js', 'test.js', 'fixtures']));
  12. //=> ['index.js', 'test.js', 'fixtures/**']
  13. console.log(await dirGlob(['index.js', 'inner_folder'], {cwd: 'fixtures'}));
  14. //=> ['index.js', 'inner_folder/**']
  15. console.log(await dirGlob(['lib/**', 'fixtures'], {
  16. files: ['test', 'unicorn']
  17. extensions: ['js']
  18. }));
  19. //=> ['lib/**', 'fixtures/**/test.js', 'fixtures/**/unicorn.js']
  20. console.log(await dirGlob(['lib/**', 'fixtures'], {
  21. files: ['test', 'unicorn', '*.jsx'],
  22. extensions: ['js', 'png']
  23. }));
  24. //=> ['lib/**', 'fixtures/**/test.{js,png}', 'fixtures/**/unicorn.{js,png}', 'fixtures/**/*.jsx']
  25. })();
  26. ```
  27. ## API
  28. ### dirGlob(input, options?)
  29. Returns a `Promise<string[]>` with globs.
  30. ### dirGlob.sync(input, options?)
  31. Returns a `string[]` with globs.
  32. #### input
  33. Type: `string | string[]`
  34. Paths.
  35. #### options
  36. Type: `object`
  37. ##### extensions
  38. Type: `string[]`
  39. Append extensions to the end of your globs.
  40. ##### files
  41. Type: `string[]`
  42. Only glob for certain files.
  43. ##### cwd
  44. Type: `string[]`
  45. Test in specific directory.