Skip to content

blackening/broccoli-typescript-incremental

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gives broccoli typescript powers. Incrementally.

Why?

Usage

First, install broccoli, then typescript.

npm install broccoli-cli -g
npm install typescript broccoli --save-dev

Next, create your brocfile.js.

var compileTypescript = require('broccoli-typescript-incremental');

var srcDir = 'your/path/to/src';
var TypescriptTree = compileTypescript(srcDir, {
  sourceMap: true,
  passthrough: true
  //Any typescript compiler options go here.
  //See http://json.schemastore.org/tsconfig
});

module.exports = TypescriptTree;

Finally, run broccoli. Note that incremental build does not work here.

broccoli build dist/

For incremental build, use broccoli-timepiece instead.

broccoli-timepiece dist/

This puts a watch on the folder - rebuilding is done automatically and the cache is used.

Limitations

All files used for compilation must be passed into the broccoli tree for compilation. In particular, take special note of the typescript definitions.

In particular, the "Could not find file in cache" error is related to this.

Future work

  • Manage file dependencies. When the build process gets sufficiently slow, to rewrite .ts dependencies and replace with preprocessed .ts.d. files which only get rebuilt when required.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •