-
Notifications
You must be signed in to change notification settings - Fork 36
/
gulpfile.js
34 lines (31 loc) · 882 Bytes
/
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
/*
* Aikar's Minecraft Timings Parser
*
* Written by Aikar <[email protected]>
* http://aikar.co
* http://starlis.com
*
* @license MIT
*/
"use strict";
const gulp = require('gulp');
require('gulp-bash-completion')(gulp);
const $u = require('./gulp.util');
const webpack = require('webpack');
const webpackConfig = require('./webpack.config');
gulp.task('build:dev', (cb) => {
let config = webpackConfig(false);
webpack(config, config.reporter(cb));
});
gulp.task('build:release', (cb) => {
let config = webpackConfig(true);
webpack(config, config.reporter(cb));
});
// aliases
gulp.task('build:prod', ['build:release']);
gulp.task('build', ['build:dev']);
gulp.task('default', () => {
process.env.NODE_ENV = process.env.NODE_ENV || "development";
let config = webpackConfig(process.env.NODE_ENV === "production", true);
webpack(config, config.reporter());
});