Sass

We use gulp for managing multiple tasks..

To compile only the sass

yarn run sass

If you want to import a css all you have to do is put it inside of the sass folder

Folder Location

Project
    assets
        sass
            main.scss
            other.scss

Styles Task in Gulpfile.js

gulp.task('styles', () => {
  gulp.src('assets/sass/**/*.scss')
    .pipe(
      sass({
        outputStyle: 'compressed'
      })
      .on('error', sass.logError))
    .pipe(autoprefixer({
      browsers: ['last 2 versions']
    }))
    .pipe(gulp.dest('./public/css'))
    .pipe(browserSync.stream())
})

results matching ""

    No results matching ""