-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_gulp.js
69 lines (58 loc) · 2.24 KB
/
run_gulp.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var notify = require("gulp-notify");
var depend_scripts = [
'app/public/share/js/jquery.js',
'app/public/share/js/bootstrap.js',
'app/public/share/js/alertifyjs/alertify.js',
'app/public/share/js/audiojs/audio.js',
'app/public/share/js/underscore-min.js',
'app/public/share/js/angular-1.2.25/angular.min.js',
'app/public/share/js/angular-1.2.25/angular-sanitize.min.js',
'app/public/share/js/angular-1.2.25/angular-route.min.js',
'app/public/share/js/angular-1.2.25/angular-resource.min.js',
'app/public/share/js/angular-1.2.25/angular-cookies.min.js',
'app/public/share/js/angular-1.2.25/angular-animate.min.js'
];
var custom_scripts = [
'app/public/share/js/html5-sortable.js',
'app/public/frontend/js/app.js',
'app/public/frontend/js/libraries/factories.js',
'app/public/frontend/js/libraries/directives.js',
'app/public/frontend/js/general.js',
'app/public/frontend/js/users/user.js',
'app/public/frontend/js/users/theme.js',
'app/public/frontend/js/users/login.js',
'app/public/frontend/js/users/logout.js',
'app/public/frontend/js/users/register.js',
'app/public/frontend/js/users/setting.js',
'app/public/frontend/js/users/forgot.js',
'app/public/frontend/js/album/album.js',
'app/public/frontend/js/link/link.js',
'app/public/frontend/js/player/player.js',
'app/public/frontend/js/song/song.js',
'app/public/frontend/js/navigation/navigation.js',
'app/public/frontend/js/header/header.js'
];
var paths = {
depend_scripts: depend_scripts,
custom_scripts: custom_scripts
};
gulp.task('depend_scripts', function() {
return gulp.src(paths.depend_scripts)
.pipe(uglify())
.pipe(concat('dependencies.min.js'))
.pipe(gulp.dest('app/public/frontend/js'))
.pipe(notify({ message: 'Scripts dependencies completed' }));
});
gulp.task('custom_scripts', function() {
return gulp.src(paths.custom_scripts)
.pipe(uglify({mangle: false}))
.pipe(concat('custom.min.js'))
.pipe(gulp.dest('app/public/frontend/js'))
.pipe(notify({ message: 'Scripts custom completed' }));
});
//gulp.watch(paths.depend_scripts, ['depend_scripts']);
gulp.start('depend_scripts');
gulp.start('custom_scripts');