Skip to content

Instantly share code, notes, and snippets.

@Korveld
Forked from BaronVonPerko/gulpfile.js
Created August 5, 2022 06:34
Show Gist options
  • Save Korveld/5c1c7413f34be1528c5cb26063e36678 to your computer and use it in GitHub Desktop.
Save Korveld/5c1c7413f34be1528c5cb26063e36678 to your computer and use it in GitHub Desktop.
Gulpfile for SCSS and Tailwind
var gulp = require('gulp');
var sass = require('gulp-sass');
var postcss = require('gulp-postcss');
gulp.task('style', function () {
var tailwindcss = require('tailwindcss');
return gulp.src('sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(postcss([
tailwindcss('./tailwind.js'),
require('autoprefixer'),
]))
.pipe(gulp.dest('./'));
});
//Watch task
gulp.task('default',function() {
gulp.watch('sass/**/*.scss',['style']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment