How to use the gulp-sass.sync function in gulp-sass

To help you get started, we’ve selected a few gulp-sass examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thedaviddias / Front-End-Design-Checklist / gulpfile.babel.js View on Github external
gulp.task('compile-styles', () => {
  return gulp.src(sassPaths.src)
    .pipe(plumber((error) => {
      console.log(error);
      this.emit('end');
    }))
    .pipe(gulpIf(isDevelopment, sourcemaps.init()))
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(autoprefixer())
    .pipe(gcmq())
    .pipe(cssnano())
    // .pipe(uncss({
    //   html: [dirs.dest + '/**/*.html']
    // }))
    .pipe(rename({
      suffix: ".min"
    }))
    .pipe(gulpIf(isDevelopment, sourcemaps.write('.')))
    .pipe(gulp.dest(sassPaths.dest))
    .pipe(browserSync.reload({stream: true}));
});
github asyncjs / async-website / _tasks / assets / styles.js View on Github external
function buildStyles() {

  return gulp.src(styles.glob)
    .pipe(sourcemaps.init())
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(autoprefixer({ browsers: ['> 1%'], cascade: false }))
    // .pipe(uncss({ html: [path.join(dist.dir, '**/*.html')] }))
    .pipe(cssnano())
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest(path.join(dist.dir, 'css/')))
}
github levlaz / braindump / gulpfile.js View on Github external
gulp.task('sass', function () {
  return gulp.src('./frontend/sass/**/*.scss')
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(concat('app.min.css'))
    .pipe(cleanCSS())
    .pipe(gulp.dest(dist.css));
});
github openbmc / phosphor-webui / gulp_tasks / webapp.js View on Github external
gulp.task('webapp:sasscompile', function() {
  return gulp.src('app/styles/index.scss')
      .pipe(sass.sync().on('error', util.log))
      .pipe(gulp.dest(options.srcFolderPath + '/styles'));
});
github ymcatwincities / openy / docroot / prototypes / branch_future / gulpfile.js View on Github external
gulp.task('style:build', function(){
    gulp.src(path.src.style)
        .pipe(sass.sync().on('error', sass.logError))
        .pipe(autoprefixer({
            browsers : ['last 9 versions', 'ie 9', '> 1%']
        }))
        .pipe(postcss([assets({
            loadPaths : ['src/images/*']
        })]))
        .pipe(gulp.dest(path.build.css))
        .pipe(browserSync.stream());
});
github andreknieriem / photobooth / gulpfile.js View on Github external
gulp.task('sass', function () {
  return gulp.src('./resources/sass/**/*.scss')
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(gulp.dest('./resources/css'));
});
github chrisdemars / bulp-starter-package / gulpfile.js View on Github external
gulp.task('sass', function () {
  return gulp.src('src/scss/**/*.scss')
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(prefix('last 2 versions'))
    .pipe(cssmin())
    .pipe(rename({suffix: '.min'}))
    .pipe(gulp.dest('dist/css'))
    .pipe(browserSync.stream());
});
github MarvelousSoftware / marvelous-aurelia-grid / build / tasks / build.js View on Github external
function buildSass(moduleName) {
  return gulp.src(paths.sass)
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(gulp.dest(paths.output + moduleName));
}
github L13 / vscode-diff / gulpfile.js View on Github external
gulp.task('style:common', () => {
	
	return gulp.src('src/views/style.scss')
		.pipe(sass.sync({ outputStyle: 'compressed' }).on('error', sass.logError))
		.pipe(gulp.dest('media'));
	
});

gulp-sass

Gulp plugin for sass

MIT
Latest version published 3 years ago

Package Health Score

62 / 100
Full package analysis