forked from craftcms/ontherocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
30 lines (26 loc) · 841 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var gulp = require('gulp');
var notifier = require('node-notifier');
gulp.task('css', function () {
var postcss = require('gulp-postcss');
var rename = require('gulp-rename');
return gulp.src('./web/styles/src/styles.pcss')
.pipe(postcss([
require('postcss-import'),
require('tailwindcss')('./tailwind.js'),
require('autoprefixer'),
], {
from: './web/styles/src/styles.pcss'
}))
.pipe(rename('styles.css'))
.pipe(gulp.dest('./web/styles/dist'));
});
gulp.task('watch', function() {
return require('gulp-watch')('./web/styles/src/**/*.pcss', function() {
gulp.start('css');
notifier.notify({
message: 'Finished building CSS',
timeout: 1
});
});
});
gulp.task('default', ['watch']);