0.0.8 • Published 8 years ago

clisiah v0.0.8

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

clisiah

Clisiah is an CLI experiment. The goal with this module is to reduce I/O and file lookup, and quickly as possible return the located files.

Features

  • Fast
  • Promisified
  • completeAsync support
  • works cross-browser
  • handle all edge cases
  • works both locally and globally

CLI

NameDescription
-h, --helpOutput usage information
-V, --versionOutput the version number
-c, --cwdChange current working directory
-e, --excludeGlob pattern for files to be ignored
-w, --watchRe-run files when source files change

Exclude

The exclude flag is only a helper so you can avoid writing a complex glob pattern every time you use the CLI. This can be done if you set default exclude settings in the package.json like this:

// `node_modules` will be excluded
 "clisiah": {
   exclude: ["!**/node_modules/**"]
 }

to overwrite default exclude settings, you can do:

 // overwrite default exclude settings
 "clisiah": {
   exclude: []
 }

If you decide not to use the exclude flag - the /node_modules folder will be excluded by default.

Package.json

All configuration can be set in the package.json file package.json. See the Exclude section above for examples.

Note! It doesn't exist any file or watch option for the configuration. Only for the CLI.

Default patterns

If no files, or no exlude pattern added, a default Glob pattern will be used instead

Default Glob pattern:

export const defaultPattern = [
    'test.js',
    'test-*.js',
    'test/*.js',
    '**/__tests__',
    '**/*.test.js'

];

Default exclude pattern with negated globs:

export const excludePattern = [
    '!**/node_modules/**',
    '!**/fixtures/**',
    '!**/helpers/**'
];