Add TypeScript support to Cell
Cell has been pretty superfluous overall since its introduction in minisphere 2.0. So far it has only served to copy files and write out a JSON manifest, which is simple enough to automate with a lowly shell script. Literally the tool's only unique application up until now has been making SPK packages.
As a first step in making Cell actually useful, add support for transpiling TypeScript and CoffeeScript code while building a game package.
Unlike the experimental TypeScript support introduced in minisphere 2.x, Cell would be able to set up a proper compile harness so that strong typing and other useful TS features actually work.
It'd probably be best to implement require() support in Cell, so that cellscripts can pull in the TypeScript compiler to use themselves.
In general it might be better for extensibility if Cell just provides basic file-level dependency management like make but leave the actual heavy lifting up to the Cellscript.
TypeScript support is implemented in master. It's drop-dead simple to use too:
const TypeScript = require('typescript');
TypeScript('@/main.js', files('src/*.ts', true));
I'm going to change the TypeScript builder a bit. Right now, it creates a single output .js file from a list of .ts files, but this ends up being very slow for large codebases because any single source file changing requires the whole program to be rebuilt. Instead I'll have it create one JS script target for each TS script, which only requires those files that changed to be rebuilt.
The above TypeScript change is now in master, and with that this issue can be closed. This was fun to implement!
Reopening because TypeScript was replaced with Babel for v4.4.0. I'd still like to have some TypeScript integration out of the box, so I'll revisit it for minisphere 5.0.
TypeScript is now the default ES6 transpiler, but Duktape has proven to be too slow down run it in full-program mode, and a command-line compiler isn't really the right venue for it anyway (no incremental compilation is possible, for example), so I'll close this.
Reopening, as the switch to ChakraCore has made running the TypeScript compiler "in-house" feasible again.
Currently blocked by #150.