Skip to content

Commit

Permalink
fix gulpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowwzw committed Mar 31, 2017
1 parent 56a9bc2 commit 6583a35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 26 deletions.
30 changes: 5 additions & 25 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ const pump = require('pump');
const eslint = require('gulp-eslint');
const babel = require('gulp-babel');
const uglify = require('gulp-uglify');
const gulpif = require('gulp-if');

gulp.task('server', cb => {
gulp.task('build', cb => {
pump([
gulp.src('src/server.js'),
gulp.src('src/*.js'),
eslint(),
eslint.format(),
eslint.failAfterError(),
Expand All @@ -19,28 +20,7 @@ gulp.task('server', cb => {
require('babel-plugin-transform-runtime'),
]
}),
gulpif('client.js', uglify()),
gulp.dest('lib')],
cb);
});

gulp.task('client', cb => {
pump([
gulp.src('src/client.js'),
eslint(),
eslint.format(),
eslint.failAfterError(),
babel({
presets: ['es2015'],
plugins: [
require('babel-plugin-transform-object-rest-spread'),
require('babel-plugin-transform-class-properties'),
require('babel-plugin-transform-async-to-generator'),
require('babel-plugin-transform-runtime'),
]
}),
uglify(),
gulp.dest('lib')],
cb);
});

gulp.task('build', ['server', 'client']);
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lite-dev-server",
"version": "1.7.37",
"version": "1.7.38",
"description": "This is http file server for develpment. This server supports livereload function and proxy function for your api server.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -46,6 +46,7 @@
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-eslint": "^3.0.1",
"gulp-if": "^2.0.2",
"gulp-uglify": "^2.1.2",
"pump": "^1.0.2",
"request": "^2.81.0",
Expand Down

0 comments on commit 6583a35

Please sign in to comment.