-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
45 lines (26 loc) · 880 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
35
36
37
38
39
40
41
42
43
44
45
var fs = require('fs');
var path = require('path');
var gulp = require('gulp');
var spawn = require('child_process').spawn;
var shell = require('gulp-shell');
var webpack = require('gulp-webpack');
var uglify = require('gulp-uglify');
var gutil = require('gulp-util');
var through = require('through2');
var pkg;
var webpackConfig = require('./webpack.config.js');
gulp.task('webpack', function() {
gulp.src("./app/client/index.js")
.pipe(webpack(webpackConfig))
.pipe(gulp.dest('./public'))
.on("error", function(err){
throw err
})
});
gulp.task('mcss', shell.task(['mcss -c app/client/mcss/mcss.json']) )
gulp.task('build', ['mcss', 'webpack']);
gulp.task('watch', [ "build"], function(){
gulp.watch(['app/client/mcss/**/*.mcss'], ['mcss']);
})
gulp.task('start', shell.task('npm start '))
gulp.task('default', ['watch', 'start'])