diff --git a/gulpfile.js b/gulpfile.js index 2e5e6023..2cae6d61 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,8 +1,8 @@ var gulp = require('gulp'), - rename = require('gulp-rename'), - zip = require('gulp-zip'), - pkg = require('./package.json'), - ts = require('gulp-typescript'), + rename = require('gulp-rename'), + zip = require('gulp-zip'), + pkg = require('./package.json'), + ts = require('gulp-typescript'), typings = require('typings'), runSequence = require('run-sequence'), sourcemaps = require('gulp-sourcemaps') @@ -11,13 +11,13 @@ var version = 'rpos-' + pkg.version; var releaseDir = 'release/' + version; //Default task: runs the typings and compile task, started when running "gulp" without any parameters. -gulp.task('default',function(cb){ - runSequence('typings','compile',cb); +gulp.task('default', function (cb) { + runSequence('typings', 'compile', cb); }); //Compile task: compiles all .ts files to .js and generates sourcemaps to aid in debugging. gulp.task('compile', function () { - return gulp.src(["**/*.ts","!./node_modules/**/*","!./typings/**/*"]) + return gulp.src(["**/*.ts", "!./node_modules/**/*", "!./typings/**/*"]) .pipe(sourcemaps.init()) .pipe(ts('tsconfig.json')) .js @@ -28,45 +28,46 @@ gulp.task('compile', function () { //Typings task: Downloads all type definitions used for development. gulp.task('typings', function (done) { var cwd = process.cwd(); - typings.install({ cwd: cwd, production: false }); - done(); + typings.install({ cwd: cwd, production: false }).then(function (result) { + done(); + }) }); //Release task: generates a release package. -gulp.task('release', ['copy-release-js', 'copy-release-bin', 'copy-release-modules', 'copy-release-views', - 'copy-release-web', 'copy-release-wsdl', 'copy-release-config'], function () { - return gulp.src([releaseDir + '/**/*', releaseDir + '/*.zip']) - .pipe(zip(version + '.zip')) - .pipe(gulp.dest('release')); -}); +gulp.task('release', ['copy-release-js', 'copy-release-bin', 'copy-release-modules', 'copy-release-views', + 'copy-release-web', 'copy-release-wsdl', 'copy-release-config'], function () { + return gulp.src([releaseDir + '/**/*', releaseDir + '/*.zip']) + .pipe(zip(version + '.zip')) + .pipe(gulp.dest('release')); + }); // --- all partial taks to generate a release. gulp.task('copy-release-js', function () { - return gulp.src(['**/*.js', '!release/**', '!gulpfile.js', 'README.md', 'package.json', '!node_modules/gulp*/**']) - .pipe(gulp.dest(releaseDir)); + return gulp.src(['**/*.js', '!release/**', '!gulpfile.js', 'README.md', 'package.json', '!node_modules/gulp*/**']) + .pipe(gulp.dest(releaseDir)); }); gulp.task('copy-release-config', function () { - return gulp.src('rposConfig.release.json') - .pipe(rename("rposConfig.json")) - .pipe(gulp.dest(releaseDir)); + return gulp.src('rposConfig.release.json') + .pipe(rename("rposConfig.json")) + .pipe(gulp.dest(releaseDir)); }); gulp.task('copy-release-bin', function () { - return gulp.src('bin/*') - .pipe(gulp.dest(releaseDir + '/bin')); + return gulp.src('bin/*') + .pipe(gulp.dest(releaseDir + '/bin')); }); gulp.task('copy-release-modules', function () { - return gulp.src(['node_modules/**/*', '!node_modules/gulp*/**', '!node_modules/gulp**']) - .pipe(gulp.dest(releaseDir + '/node_modules')); + return gulp.src(['node_modules/**/*', '!node_modules/gulp*/**', '!node_modules/gulp**']) + .pipe(gulp.dest(releaseDir + '/node_modules')); }); gulp.task('copy-release-views', function () { - return gulp.src('views/**/*') - .pipe(gulp.dest(releaseDir + '/views')); + return gulp.src('views/**/*') + .pipe(gulp.dest(releaseDir + '/views')); }); gulp.task('copy-release-web', function () { - return gulp.src('web/**/*') - .pipe(gulp.dest(releaseDir + '/web')); + return gulp.src('web/**/*') + .pipe(gulp.dest(releaseDir + '/web')); }); gulp.task('copy-release-wsdl', function () { - return gulp.src('wsdl/**/*') - .pipe(gulp.dest(releaseDir + '/wsdl')); + return gulp.src('wsdl/**/*') + .pipe(gulp.dest(releaseDir + '/wsdl')); }); diff --git a/package.json b/package.json index ca8b88c8..39fbd22a 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "express": "4.12.3", "body-parser": "1.12.3", "node-uuid": "1.4.7", - "uuid5": "1.0.1", "xml2js":"0.4.16" },