ext-coffeesctipt
Transpile coffeescript files into javascript.
Usage
rtb.coffeeScript(options={});
Options
options will override rtb.moduleOptions.
rtb.buildOptions (BuildConfig.buildOptions)
Option | Type | Default | Description |
---|---|---|---|
babel | boolean | false | Enable babel. |
lint | boolean | false | Enable linter |
rtb.moduleOptions (BuildConfig.moduleOptions)
property | type | default | description |
---|---|---|---|
coffee | Object | {} | Options to gulp-coffee. Default becomes { bare: true } if rtb.buildOptions.babel is true |
coffeelint | Object | {} | Options to gulp-coffeelint. |
babel | Object | {} | Options to gulp-babel. |
Example
const tron = require('gulp-tron');
const coffee = {
name: 'coffee',
builder: (rtb) => rtb.src().coffee().dest(),
src: ['assets/coffee/**/*.coffee'],
dest: 'www/js',
outFile: 'sample-coffee.js',
buildOptions: { babel: true },
npmInstall: ['@babel/preset-env']
};
Notes
This extension is for custom processing. Use GCoffeeScriptBuilder for coffeescript file processiing.