-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (29 loc) · 887 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
34
35
36
'use strict';
var gulp = require('gulp');
var nodemon = require('gulp-nodemon');
var jscs = require('gulp-jscs');
var sass = require('gulp-sass');
var webserver = require('gulp-webserver');
// FrontEnd related tasks
gulp.task('sass', function() {
gulp.src('./web-app/styles/scss/main.scss')
.pipe(sass())
.pipe(gulp.dest('./web-app/styles/css'))
});
gulp.task('watch-sass', function() {
gulp.watch('./web-app/styles/scss/*.scss', ['sass']);
});
gulp.task('run-front', ['sass','watch-sass'], function() {
gulp.src('web-app')
.pipe(webserver({
fallback: 'index.html',
livereload: true,
open: true
}));
});
// BackEnd related tasks
gulp.task('run-back', function () {
nodemon({script: 'app.js', env: {'NODE_ENV': 'development'}, ext: 'js, html, scss'});
});
gulp.task('run-app', ['run-back', 'run-front']);
gulp.task('default', ['run-app']);