gulpfile.js
function buildCSS(src, filename, dest, applyHeader) {
  dest = dest || config.dist.cssPath;
  applyHeader = applyHeader || false;

  return gulp.src(src)
    .pipe(sass({
      includePaths: [config.src.scssPath, config.packagesPath]
    })
      .on('error', sass.logError))
    .pipe(cleanCSS())
    .pipe(autoprefixer({
      // Supported browsers added in package.json ("browserslist")
      cascade: false
    }))
    .pipe(gulpif(applyHeader, header(config.prj.header, {
      config: config
    })))
    // Remove charset rule (if present) and add to the first
    // line of the stylesheet (@charset must be on the first line)
    .pipe(replace('@charset "UTF-8";', ''))
    .pipe(header('@charset "UTF-8";\n'))
    .pipe(rename(filename))
    .pipe(gulp.dest(dest));
}
function buildCSS(src, filename, dest, applyHeader) {
  dest = dest || config.dist.cssPath;
  applyHeader = applyHeader || false;

  return gulp.src(src)
    .pipe(sass({
      includePaths: [config.src.scssPath, config.packagesPath]
    })
      .on('error', sass.logError))
    .pipe(cleanCSS())
    .pipe(autoprefixer({
      // Supported browsers added in package.json ("browserslist")
      cascade: false
    }))
    .pipe(gulpif(applyHeader, header(config.prj.header, {
      config: config
    })))
    // Remove charset rule (if present) and add to the first
    // line of the stylesheet (@charset must be on the first line)
    .pipe(replace('@charset "UTF-8";', ''))
    .pipe(header('@charset "UTF-8";\n'))
    .pipe(rename(filename))
    .pipe(gulp.dest(dest));
}
function buildCSS ( src , filename , dest , applyHeader ) { dest = dest || config . dist . cssPath ; applyHeader = applyHeader || false ; return gulp . src ( src ) . pipe ( sass ( { includePaths : [ config . src . scssPath , config . packagesPath ] } ) . on ( 'error' , sass . logError ) ) . pipe ( cleanCSS ( ) ) . pipe ( autoprefixer ( { // Supported browsers added in package.json ("browserslist") cascade : false } ) ) . pipe ( gulpif ( applyHeader , header ( config . prj . header , { config : config } ) ) ) // Remove charset rule (if present) and add to the first // line of the stylesheet (@charset must be on the first line) . pipe ( replace ( '@charset "UTF-8";' , '' ) ) . pipe ( header ( '@charset "UTF-8";\n' ) ) . pipe ( rename ( filename ) ) . pipe ( gulp . dest ( dest ) ) ; }
Compile scss files
Compile scss files