Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mowatch ignores custom extensions #16

Open
janslow opened this issue Oct 15, 2016 · 0 comments
Open

mowatch ignores custom extensions #16

janslow opened this issue Oct 15, 2016 · 0 comments

Comments

@janslow
Copy link

janslow commented Oct 15, 2016

I'm trying to use mowatch to test a TypeScript project (with *.ts files).

The mocha command I use is mocha --recursive --compilers ts:ts-node/register src, so that node uses ts-node to import TypeScript files and so that Mocha discovers .ts files.

However, mowatch hard codes the .js extension into globberFactory, so it doesn't find the source files and throws an error:

Error: Error: ENOENT: no such file or directory, stat 'src/**/*.spec.ts'
    at fatal (/Users/janslow/dev/cfl/cfl-npm/generator-npm/node_modules/mowatch/bin/mowatch.js:34:9)
    at /Users/janslow/dev/test/node_modules/mowatch/bin/mowatch.js:46:16
    at /Users/janslow/dev/test/node_modules/async/lib/async.js:52:16
    at /Users/janslow/dev/test/node_modules/async/lib/async.js:361:13
    at /Users/janslow/dev/test/node_modules/async/lib/async.js:52:16
    at done (/Users/janslow/dev/test/node_modules/async/lib/async.js:241:17)
    at /Users/janslow/dev/test/node_modules/async/lib/async.js:44:16
    at /Users/janslow/dev/test/node_modules/async/lib/async.js:358:17
    at /Users/janslow/dev/test/node_modules/mowatch/lib/index.js:54:16
    at /Users/janslow/dev/test/node_modules/async/lib/async.js:52:16

It would be useful if the --compilers (and probably --watch-extensions) was used to build the glob.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant