Update publish command to clean up

This commit is contained in:
Andrew Miner
2016-04-04 19:13:12 -07:00
parent 2cc3d04be2
commit d18cbb407a
2 changed files with 4 additions and 3 deletions
+4 -1
View File
@@ -185,6 +185,9 @@ module.exports = (grunt)->
grunt.registerTask 'prepublish', 'build the project to be published to NPM as shared code', grunt.registerTask 'prepublish', 'build the project to be published to NPM as shared code',
['clean', 'coffee'] ['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', grunt.registerTask 'start', 'build the project and start a local HTTP server',
['build', 'script:start'] ['build', 'script:start']
@@ -248,7 +251,7 @@ module.exports = (grunt)->
done = this.async() done = this.async()
grunt.util.spawn cmd:'./scripts/deploy', args:['--staging'], opts:{stdio:'inherit'}, (error)-> done(error) 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() done = this.async()
grunt.util.spawn cmd:'./scripts/publish', opts:{stdio:'inherit'}, (error)-> done(error) grunt.util.spawn cmd:'./scripts/publish', opts:{stdio:'inherit'}, (error)-> done(error)
-2
View File
@@ -12,5 +12,3 @@ done
npm version "$VERSION_TYPE" || die "Invalid version type: $VERSION_TYPE" npm version "$VERSION_TYPE" || die "Invalid version type: $VERSION_TYPE"
npm publish npm publish
grunt clean build