ext-css

Transpiles sass/scss/less/postcss files into css. postcss can be used together with sass/scss/less. PostCSS is enabled by default (from v3.1) unless it's turned off intentionally.

Usage

rtb.css(options={});

Options

options will override rtb.moduleOptions.

rtb.buildOptions (BuildConfig.buildOptions)

OptionTypeDefaultDescription
sourceTypestring'scss'Specifies input source type. Possible values are 'css', 'scss', 'sass', 'less'.
postcssbooleantrueEnable PostCSS.
autoprefixerbooleantrueEnable autoprefixer.
lintbooleanfalseEnable lint.

rtb.moduleOptions (BuildConfig.moduleOptions)

PropertyTypeDefaultDescription
sassObject{}Options to gulp-sass.
autoprefixerObject{}Options to gulp-autoprefixer or autoprefixer(if postcss enabled).
postcssObject{}Options to gulp-postcss.
postcss.pluginsarray[]plugins to gulp-postcss.
stylelintObject{}Options to gulp-style or stylelint(if postcss enabled).
postcssReporterObject{}Options to postcss-reporter. Valid only when rtb.buildOptions.postcss is true.

Example

const tron = require('gulp-tron');
const coffee = {
name: 'style',
builder: (rtb) => rtb.src().css().dest(),
src: ['assets/style/**/*.scss'],
dest: 'www/css',
};

Notes

This extension is for custom processing. Use GCSSBuilder for CSS file processiing.