forked from ecvdbdx/OnMangeQuoiAMidi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
48 lines (40 loc) · 1.44 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
43
44
45
46
47
48
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var sassPaths = [
'./node_modules/bootstrap-sass/assets'
];
var fontPaths = [
'./node_modules/bootstrap-sass/assets/fonts/**'
];
var jsFiles = [
'./node_modules/jquery/dist/jquery.js',
'./node_modules/bootstrap-sass/assets/javascript/bootstrap.js',
'./src/AppBundle/Resources/public/js/main.js',
'./src/AppBundle/Resources/public/js/jquery.datetimepicker.full.js'
];
gulp.task('sass', function () {
return gulp.src('src/AppBundle/Resources/public/scss/style.scss')
.pipe($.sass({
includePaths: sassPaths,
outputStyle: 'compressed' // if css compressed **file size**
})
.on('error', $.sass.logError))
.pipe($.autoprefixer({
browsers: ['last 2 versions', 'ie >= 9']
}))
.pipe(gulp.dest('./src/AppBundle/Resources/public/css'));
});
gulp.task('js', function () {
return gulp.src(jsFiles)
.pipe($.concat('build.js'))
.pipe(gulp.dest('./src/AppBundle/Resources/public/js/'))
});
gulp.task('fonts', function() {
return gulp.src(fontPaths)
.pipe(gulp.dest('./src/AppBundle/Resources/public/fonts'));
});
gulp.task('default', ['sass', 'js', 'fonts'], function () {
gulp.watch(['src/AppBundle/Resources/public/scss/**/*.scss'], ['sass']);
gulp.watch(['src/AppBundle/Resources/public/js/main.js'], ['js']);
});
gulp.task('build', ['sass', 'js', 'fonts']);