-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGulpfile.js
49 lines (37 loc) · 1.06 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
49
'use strict';
var config = require('./gulpconfig.json');
var gulp = require('gulp');
var watch = require('gulp-watch');
var sass = require('gulp-sass');
var gutil = require('gulp-util');
var concat = require('gulp-concat');
var input_files = [
config.scss + 'style.scss'
];
var css_files = [
config.scss + '**/*'
];
var js_files = [
config.bower + 'jquery/dist/jquery.js',
config.bower + 'travist/jsencrypt/bin/jsencrypt.min.js'
];
var css_output_path = config.css;
var js_output_file = 'application.js';
var js_output_path = config.js;
gulp.task('sass', function () {
gulp.src(input_files)
.pipe(sass.sync().on('error', sass.logError))
.pipe(gulp.dest(css_output_path));
});
gulp.task('sass:watch', function () {
gulp.watch(css_files, ['sass']);
});
gulp.task('scripts', function(){
gulp.src(js_files)
.pipe(concat(js_output_file).on('error', gutil.log))
.pipe(gulp.dest(js_output_path))
});
gulp.task('watch', function(){
gulp.watch(css_files, ['sass', 'scripts'])
});
gulp.task('default', ['sass', 'scripts']);