-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
executable file
·55 lines (47 loc) · 1.32 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
50
51
52
53
54
55
/**
* ------------------------------------------------------------------------
* Gulp Setup for SublimeStripe OctoberCMS Plugin
* Version: 1.0.1
* Author: Pratyush Pundir | pratyushpundir@icloud.com | https://www.sublimearts.me
* License: MIT
* ------------------------------------------------------------------------
*/
/**
* Getting the required packages
* @type {[type]}
*/
var gulp = require('gulp'),
notify = require("gulp-notify"),
babel = require("gulp-babel"),
concatJS = require("gulp-concat"),
minifyJS = require("gulp-uglify"),
bust = require("gulp-buster"),
watch = require('gulp-watch');
/**
* Some Configuration
* @type {Object}
*/
var config = {
'version': '1.0.1',
'srcDir': './assets/src/js',
'distDir': './assets/dist/js'
}
gulp.task('js', function() {
return gulp.src([
config.srcDir + '/vendor/vue-2.1.3.js',
config.srcDir + '/sublimestripe-' + config.version + '.js'
])
.pipe(concatJS('/bundle.js'))
// .pipe(babel({
// presets: ['es2015']
// }))
.pipe(minifyJS())
.pipe(notify('JS concatenated!'))
.pipe(gulp.dest(config.distDir));
});
gulp.task('watch', function() {
gulp.watch([
config.srcDir + '/**/*'
], ['js']);
});
gulp.task('default', ['js', 'watch']);