From d18cbb407aa469bfbe5a5f9b4bf84cc6349e6dbb Mon Sep 17 00:00:00 2001 From: Andrew Miner Date: Mon, 4 Apr 2016 19:13:12 -0700 Subject: [PATCH] Update publish command to clean up --- Gruntfile.coffee | 5 ++++- scripts/publish | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 7866d6728..fd6b4482b 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -185,6 +185,9 @@ module.exports = (grunt)-> grunt.registerTask 'prepublish', 'build the project to be published to NPM as shared code', ['clean', 'coffee'] + grunt.registerTask 'publish', 'publish the project to NPM', + ['prepublish', 'script:publish', 'clean', 'build'] + grunt.registerTask 'start', 'build the project and start a local HTTP server', ['build', 'script:start'] @@ -248,7 +251,7 @@ module.exports = (grunt)-> done = this.async() grunt.util.spawn cmd:'./scripts/deploy', args:['--staging'], opts:{stdio:'inherit'}, (error)-> done(error) - grunt.registerTask 'publish', 'publishes this package to NPM', -> + grunt.registerTask 'script:publish', 'publishes this package to NPM', -> done = this.async() grunt.util.spawn cmd:'./scripts/publish', opts:{stdio:'inherit'}, (error)-> done(error) diff --git a/scripts/publish b/scripts/publish index f6ea84274..2ffa65c9a 100755 --- a/scripts/publish +++ b/scripts/publish @@ -12,5 +12,3 @@ done npm version "$VERSION_TYPE" || die "Invalid version type: $VERSION_TYPE" npm publish - -grunt clean build \ No newline at end of file