Skip to content

Instantly share code, notes, and snippets.

@alex-boom
Created July 20, 2016 08:29
Show Gist options
  • Save alex-boom/efbd0978be9c705a842940d731ae2d62 to your computer and use it in GitHub Desktop.
Save alex-boom/efbd0978be9c705a842940d731ae2d62 to your computer and use it in GitHub Desktop.
gulp
gulp.task('buildSass', function () {
gulp.src(`./${Paths.src}/${Paths.scss}/app.scss`)
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(sass(/*{outputStyle: 'compact'} вставляем если нужен не минифицированный код css*/).on('error', function (err) {
showError.apply(this, ['Sass compile error', err]);
}))
.pipe(gcmq())
.pipe(cssnano({safe: true})) // нужно закоментировать для отключения минификации файла css
.pipe(autoprefixer('last 3 versions'))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(`./${Paths.build}/`));
//.pipe(sass({outputStyle: 'expanded', 'compact', compress}) включение разных вариантов, минифицировать, не минифицировать и т.д.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment