-
Notifications
You must be signed in to change notification settings - Fork 25
/
gulpfile.js
42 lines (37 loc) · 1.11 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
var gulp = require('gulp');
// Mixin the platform specific options
var options = require('./build/config');
var platformOptions;
// Window-specific configuration
if (/^win/.test(process.platform)) {
platformOptions = options.win;
}
// Mac-specific configuration
else if (/^darwin/.test(process.platform)) {
platformOptions = options.mac;
}
else {
console.log('Platform is not supported');
process.exit(1);
}
// Merge the platform options into the default
Object.assign(options, platformOptions);
// Gulp plugins for tasks to use
var plugins = {
del: require('del'),
colors: require('colors'),
path: require('path'),
fs: require('fs'),
shell: require('gulp-shell'),
rename: require('gulp-rename'),
eslint: require('gulp-eslint'),
install: require('gulp-install'),
browserify: require('browserify'),
buffer: require('vinyl-buffer'),
source: require('vinyl-source-stream'),
msbuild: require('gulp-msbuild'),
build: require('./build/bundle'),
uglify: require('gulp-terser'),
gulpif: require('gulp-if')
};
require('load-gulp-tasks')(gulp, options, plugins);