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)
Option | Type | Default | Description |
---|---|---|---|
sourceType | string | 'scss' | Specifies input source type. Possible values are 'css', 'scss', 'sass', 'less'. |
postcss | boolean | true | Enable PostCSS. |
autoprefixer | boolean | true | Enable autoprefixer. |
lint | boolean | false | Enable lint. |
rtb.moduleOptions (BuildConfig.moduleOptions)
Property | Type | Default | Description |
---|---|---|---|
sass | Object | {} | Options to gulp-sass. |
autoprefixer | Object | {} | Options to gulp-autoprefixer or autoprefixer(if postcss enabled). |
postcss | Object | {} | Options to gulp-postcss. |
postcss.plugins | array | [] | plugins to gulp-postcss. |
stylelint | Object | {} | Options to gulp-style or stylelint(if postcss enabled). |
postcssReporter | Object | {} | 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.