0.21.0 • Published 4 years ago
@reboost/plugin-typescript v0.21.0
TypeScript Plugin
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).
Usage
Setup
Install it using npm
npm i -D @reboost/plugin-typescriptInstall typescript package, if not already installed
npm i typescriptImport 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
})
]
})Options
tsconfig
Type: string\
Default: ./tsconfig.json
Path to the tsconfig file.
compatibleTypes
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.
License
Licensed under the MIT License.