From 53f165d6b8278e9369f281a1082492ab2b460aa5 Mon Sep 17 00:00:00 2001 From: cssmagic Date: Fri, 25 Dec 2015 10:47:06 +0800 Subject: [PATCH] Update building system. --- gulpfile.js | 10 +++++----- package.json | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 110f80b..661b457 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -34,12 +34,12 @@ gulp.task('default', ['clean'], function () { gulp.start('js') }) -gulp.task('clean', function () { - del(path.join(myPath.dest, '*.*')) +gulp.task('clean', function (callback) { + del(path.join(myPath.dest, '*.*'), callback) }) -gulp.task('clean-temp', function () { - del(path.join(myPath.temp, '*.*')) +gulp.task('clean-temp', function (callback) { + del(path.join(myPath.temp, '*.*'), callback) }) gulp.task('prepare-module', ['clean-temp'], function () { @@ -52,7 +52,7 @@ gulp.task('prepare-module', ['clean-temp'], function () { }) }) -gulp.task('js', ['prepare-module'], function() { +gulp.task('js', function() { // combine external modules Object.keys(modules).forEach(function (key) { scripts.push(path.join(myPath.temp, key + '.js')) diff --git a/package.json b/package.json index 7e84140..8be7cb0 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,7 @@ "description": "Lightweight JavaScript utilities for mobile web development.", "license": "MIT", "scripts": { - "dist": "gulp", - "clean": "gulp clean", - "js": "gulp js", + "dist": "gulp prepare-module && gulp", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": {},