Transpile TypeScript files using the official TypeScript compiler. So that you can try out new TypeScript features without waiting.
NOTE: It does not checks for types. You have to do handle that by yourself. If you are
using the CLI then you can use command tsc --noEmit
(or tsc --noEmit --watch
).
Install it using npm
npm i -D @reboost/plugin-typescript
Install typescript
package, if not already installed
npm i typescript
Import it from the package
const { start } = require('reboost');
const TypeScriptPlugin = require('@reboost/plugin-typescript');
Add it to the plugins array
const { start } = require('reboost');
const TypeScriptPlugin = require('@reboost/plugin-typescript');
start({
plugins: [
TypeScriptPlugin({
// Options
})
]
})
Type: string
Default: ./tsconfig.json
Path to the tsconfig
file.
Type: string[]
Default: ['ts']
The file types that would be compiled by the plugin. Ex. If you set it to ['js', 'ts']
,
the plugin will also compile JavaScript files.
Licensed under the MIT License.