-
Notifications
You must be signed in to change notification settings - Fork 17
/
gulpfile.js
33 lines (28 loc) · 965 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
31
32
33
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass')(require('sass'));
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var paths = {
scss_core : [ 'css/scss/**/*.scss', 'css/' ],
js_backend: [ 'js/saturne.js', 'js/modules/*.js' ]
};
/** Core */
gulp.task( 'scss_core', function() {
return gulp.src( paths.scss_core[0] )
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(rename('./saturne.min.css'))
.pipe(gulp.dest( paths.scss_core[1]));
});
gulp.task('js_backend', function () {
return gulp.src(paths.js_backend)
.pipe(concat('saturne.min.js'))
.pipe(uglify())
.pipe(gulp.dest('./js/')) // It will create folder client.min.js
});
/** Watch */
gulp.task('default', function() {
gulp.watch(paths.scss_core[0], gulp.series('scss_core'));
gulp.watch(paths.js_backend[1], gulp.series('js_backend'));
});