-
Notifications
You must be signed in to change notification settings - Fork 6
/
gulpfile.js
79 lines (63 loc) · 2.1 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
var gulp = require('gulp'),
zip = require('gulp-zip'),
info = require('./package.json');
eslint = require('gulp-eslint');
var options = {
"eslint": {
"globals": {
"require": true
},
"useEslintrc": true
}
};
var paths = {
"js_src": "app/js/**/*.js",
"linux_x64": ['build/Marvelous-linux-x64/**'],
"linux_x32": ['build/Marvelous-linux-ia32/**'],
"darwin_x64": ['build/Marvelous-darwin-x64/**'],
"darwin_x32": ['build/Marvelous-darwin-ia32/**'],
"win_x64": ['build/Marvelous-win-x64/**'],
"win_x32": ['build/Marvelous-win-ia32/**']
};
gulp.task('lint:js', function () {
return gulp.src(paths["js_src"])
.pipe(eslint(options.eslint))
.pipe(eslint.formatEach('compact', process.stderr));
})
gulp.task('release:linux-x64', function () {
return gulp.src(paths["linux_x64"])
.pipe(zip(info.name + "-linux-x64-" + info.version + ".zip"))
.pipe(gulp.dest('dist'));
});
gulp.task('release:linux-x32', function () {
return gulp.src(paths["linux_x32"])
.pipe(zip(info.name + "-linux-x32-" + info.version + ".zip"))
.pipe(gulp.dest('dist'));
});
gulp.task('release:linux', ['release:linux-x64', 'release:linux-x32'], function () {
});
gulp.task('release:darwin-x64', function () {
return gulp.src(paths["darwin_x64"])
.pipe(zip(info.name + "-darwin-x64-" + info.version + ".zip"))
.pipe(gulp.dest('dist'));
});
gulp.task('release:darwin-x32', function () {
return gulp.src(paths["darwin_x32"])
.pipe(zip(info.name + "-darwin-x32-" + info.version + ".zip"))
.pipe(gulp.dest('dist'));
});
gulp.task('release:darwin', ['release:darwin-x64', 'release:darwin-x32'], function () {
});
gulp.task('release:win-x64', function () {
return gulp.src(paths["win_x64"])
.pipe(zip(info.name + "-win-x64-" + info.version + ".zip"))
.pipe(gulp.dest('dist'));
});
gulp.task('release:win-x32', function () {
return gulp.src(paths["win_x32"])
.pipe(zip(info.name + "-win-x32-" + info.version + ".zip"))
.pipe(gulp.dest('dist'));
});
gulp.task('release:win', ['release:win-x64', 'release:win-x32'], function () {
});
gulp.task('default', ['release:linux']);