-
Notifications
You must be signed in to change notification settings - Fork 38
Expose a JS API #80
Comments
@Andarist great thinking. |
this feature would help with using this module in unit tests with eg "mocha" |
Yep, integration into build process seems more error-prone rather than checking each time manually, and wrap this lib into |
You've already got an API by using Caporal. Then, non-CLI users will be able to simply execute your Caporal const esCheck = require('es-check');
esCheck.exec(['es5', 'my/files/**/*.js', {
module: true,
allowHashBang: false,
not: 'glob/to/ignore'
}); Of course ideally, you'd wrap the const esCheck = require('es-check');
esCheck.run({
es: 'es5',
files: [
'my/files/**/*.js',
'some/other/**/*.{js,jsx}'
],
module: true,
allowHashBang: false,
not: 'glob/to/ignore'
}); |
Note: I just wrote a script to capture the output of But that does highlight the need for a Might spin up a PR 😜 |
Requested Update
Expose a JS API so the module can be required and used as a function.
Why Is This Update Needed?
Currently this module is only a CLI tool, but it would be great to use it programatically too.
Are There Examples Of This Requested Update Elsewhere?
n/a
The text was updated successfully, but these errors were encountered: