forked from cashmusic/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
53 lines (44 loc) · 1.42 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
var gulp = require('gulp');
var closure = require('gulp-closure-compiler-service');
var jsonlint = require("gulp-jsonlint");
var shell = require('gulp-shell');
var argv = require('yargs').argv;
var uglify = require('gulp-uglify');
var js_source = './interfaces/public/cashmusicjs/source/';
var paths = {
scripts: [
js_source+'cashmusic.js'], /*,
js_source+'checkout/checkout.js',
js_source+'share/share-buttons.js'*/
json: [
'./framework/settings/**/*.json',
'./framework/elements/**/*.json',
'./interfaces/admin/components/**/*.json'
]
};
gulp.task('compile', function() {
return gulp.src(paths.scripts, {base: './interfaces/public/cashmusicjs/source/'})
.pipe(closure())
.pipe(gulp.dest('interfaces/public/'));
});
gulp.task('compile-admin', function() {
return gulp.src(paths.scripts, {base: './interfaces/public/cashmusicjs/source/'})
.pipe(closure())
.pipe(gulp.dest('interfaces/public/'));
});
gulp.task('jsonlint', function() {
return gulp.src(paths.json)
.pipe(jsonlint())
.pipe(jsonlint.reporter());
});
gulp.task('vagrant-rsync', shell.task([
'vagrant rsync '+argv.box
]));
gulp.task('watch', function() {
gulp.watch(paths.scripts, ['compile']);
gulp.watch(paths.json, ['jsonlint']);
});
gulp.task('watch-rsync', function() {
gulp.watch("./**/*.*", ['vagrant-rsync']);
});
gulp.task('default', ['compile']);