chin plugin for using gulp plugins.
yarn add -D chin chin-plugin-gulp
import gulp from 'chin-plugin-gulp'
import sass from 'gulp-sass'
import autoprefixer from 'gulp-autoprefixer'
import minify from 'gulp-minify-css'
const sass2css = gulp(() => [
sass(),
autoprefixer(),
minify()
])
export default {
put,
out,
processors: { sass: sass2css }
}
Instead of gulp-concat
which can not be used in chin.
import { concat } from 'chin-plugin-gulp'
import sass from 'gulp-sass'
import autoprefixer from 'gulp-autoprefixer'
import minify from 'gulp-minify-css'
const sass2css = concat(() => [
sass(),
autoprefixer(),
minify()
])
export default {
put,
out,
processors: { sass: sass2css },
after: () => sass2css.dest('dist/concated.css')
}