ext-typescript

Typescript transpiler.

Usage

rtb.typescript(options={});

Options

options will override rtb.moduleOptions.

rtb.buildOptions (BuildConfig.buildOptions)

OptionTypeDefaultDescription
lintbooleanfalseEnable linter
printConfigbooleanfalsePrint tsConfig settings actually used.

rtb.moduleOptions (BuildConfig.moduleOptions)

propertytypedefaultdescription
typescriptObject{}Options to gulp-typescript.
tslintObject{}Options to gulp-tslint.

Example

const coffee = {
name: 'coffee',
src: ['assets/coffee/**/*.coffee'],
dest: 'www/js',
outFile: 'sample-coffee.js',
buildOptions: { babel: true },
npmInstall: ['@babel/preset-env']
};

Example

const typeScript = {
name: 'typeScript',
builder: (rtb) => rtb.src().coffee().dest(),
src: ['assets/scripts/**/*.ts'],
dest: 'www/js',
buildOptions: {
tsConfig: './tsconfig.json',
printConfig: true
},
};

Notes

This extension is for custom processing. Use GTypeScriptBuilder for typescript file processiing.