Skip to content

Commit

Permalink
Added a publish gulp script
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Jun 11, 2015
1 parent bde9566 commit f95a706
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
24 changes: 24 additions & 0 deletions build/publish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var gulp = require('gulp'),
runSequence = require('run-sequence'),
replace = require('gulp-replace'),
spawn = require('child_process').spawn;

gulp.task('publish', function () {
return runSequence('publish-prep', 'publish-action', 'publish-clean');
});

gulp.task('publish-prep', function () {
return gulp.src('_references.d.ts')
.pipe(replace(/^\/{3}.*tsd\.d\.ts.*$/, '//$0'))
.pipe(gulp.dest('.'));
});

gulp.task('publish-action', function (done) {
spawn('npm', ['publish'], { stdio: 'inherit' }).on('close', done);
});

gulp.task('publish-clean', function () {
return gulp.src('_references.d.ts')
.pipe(replace(/^\/{2}(\/{3}.*tsd\.d\.ts.*)$/, '$1'))
.pipe(gulp.dest('.'));
});
3 changes: 2 additions & 1 deletion build/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ var gulp = require('gulp'),
gutil = require('gulp-util'),
git = require('gulp-git'),
minimist = require('minimist'),
semver = require('semver');
semver = require('semver'),
runSequence = require('run-sequence');

var paths = require('./paths');

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"gulp-bump": "~0.3.1",
"gulp-git": "^1.2.4",
"gulp-istanbul": "~0.10.0",
"gulp-replace": "~0.5.3",

"istanbul": "~0.3.13",
"jshint": "^2.7.0",
Expand Down

0 comments on commit f95a706

Please sign in to comment.