-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
42 lines (38 loc) · 1 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var sassPaths = [
'bower_components/foundation-sites/scss',
'bower_components/motion-ui/src'
];
gulp.task('sass', function() {
return gulp.src('scss/ebi_framework.scss')
.pipe($.sass({
includePaths: sassPaths
})
.on('error', $.sass.logError))
.pipe($.autoprefixer({
browsers: ['last 2 versions', 'ie >= 9']
}))
.pipe(gulp.dest('css'));
});
// Run drush to clear the theme registry
gulp.task('drush', function() {
return gulp.src('', {
read: false
})
.pipe($.shell([
'drush cr -y',
]))
.pipe($.notify({
title: "Caches cleared",
message: "Drupal caches cleared.",
onLast: true
}));
});
gulp.task('default', ['sass', 'drush'], function() {
gulp.watch(['scss/**/*.scss'], ['sass', 'drush']);
gulp.watch("templates/*.twig", ['drush']);
gulp.watch("**/*.yml", ['drush']);
gulp.watch("**/*.theme", ['drush']);
gulp.watch("src/*.php", ['drush']);
});