pixijs/floss

Typescript example

v3gard opened this issue · 2 comments

Regarding use of typescript with floss (mentioned in #29), I find the example in the wiki to be a bit confusing:

https://github.com/pixijs/floss/wiki/Running-TypeScript-with-Floss

If I am used to run mocha tests with ts-loader, and I have all my .ts tests defined in the "<project_dir>/test" folder, I can run mocha like this:

mocha -r ts-node/register "test/**/*.ts"

What would be the equivalent for floss?

Mocha on the command line can consume a glob of files (eg "tests/*.ts", this is not the same for floss. You give it a single entry point (eg tests/index.js and that, like a node script, requires a bunch of others tests). The example you mentioned in the wiki assumes you add the ts-loader before requiring any other tests.

But I think we could change this to work more like mochas command line without breaking (including the ts-node/register.