Skip to content

Commit

Permalink
fixed 'typings' task
Browse files Browse the repository at this point in the history
removed unnecessary dependency
  • Loading branch information
BreeeZe committed May 11, 2016
1 parent 4eccc43 commit 4769a91
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
61 changes: 31 additions & 30 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -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')
Expand All @@ -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
Expand All @@ -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'));
});
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"

},
Expand Down

0 comments on commit 4769a91

Please sign in to comment.