Broccoli v2.3.0 Release Notes
Release Date: 2019-03-20 // about 5 years ago-
The future is here, today!
๐ฑ Broccoli now supports a Brocfile.ts, and will auto compile this through ts-node ๐
0๏ธโฃ By default, ts-node uses TypeScript defaults for the compiler options. If you wish to add your own compiler options to make things stricter, you can add a tsconfig.json of your own and Broccoli should auto pick this up.
So now:
import merge = require('broccoli-merge-trees');import uglify = require('broccoli-uglify-sourcemap');import { BrocfileOptions } from 'broccoli';export default (options: BrocfileOptions) =\> { let js = 'src/a'; if (options.env === 'production') { js = uglify(js); } return merge([js, 'src/b']); }
Should work, and your editor should get access to the types it can find.
๐ Over time, we will push for plugin developers to define at least a type definition, and provide documentation for how to convert a plugin to TypeScriptThanks to everyone who helped in reviewing this.