mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(publish): rename prepare to prepublish, remove publish task
This commit is contained in:
24
gulpfile.js
24
gulpfile.js
@ -468,7 +468,7 @@ gulp.task('package', ['src.release'], function(done){
|
||||
});
|
||||
|
||||
|
||||
gulp.task('!prepare', function(){
|
||||
gulp.task('prepare', function(){
|
||||
var execSync = require('child_process').execSync;
|
||||
var spawnSync = require('child_process').spawnSync;
|
||||
var semver = require('semver');
|
||||
@ -510,26 +510,8 @@ gulp.task('!prepare', function(){
|
||||
|
||||
});
|
||||
|
||||
gulp.task('prepare', ['package', '!prepare']);
|
||||
|
||||
gulp.task('publish', function(done){
|
||||
var spawn = require('child_process').spawn;
|
||||
var fs = require('fs');
|
||||
|
||||
var npmCmd = spawn('npm', ['publish', './dist']);
|
||||
|
||||
npmCmd.stdout.on('data', function (data) {
|
||||
console.log(data.toString());
|
||||
});
|
||||
|
||||
npmCmd.stderr.on('data', function (data) {
|
||||
console.log('npm err: ' + data.toString());
|
||||
});
|
||||
|
||||
npmCmd.on('close', function() {
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task('prepublish', ['prepare'], function(done){
|
||||
runSequence('package', done);
|
||||
});
|
||||
|
||||
require('./scripts/docs/gulp-tasks')(gulp, flags)
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
### Building API Docs
|
||||
|
||||
1. `gulp docs` to build the nightly version
|
||||
1. `gulp docs` to build the nightly version
|
||||
2. `gulp docs --doc-version=2.0.0` to build a specific API version
|
||||
|
||||
|
||||
@ -49,11 +49,13 @@
|
||||
|
||||
### Releasing Ionic Source
|
||||
|
||||
1. Pull latest code
|
||||
2. Run [snapshot](#running-snapshot) & update if necessary
|
||||
3. Bump version in package.json
|
||||
4. `gulp publish`
|
||||
5. Sit back and have a beer :beer: (or wine :wine_glass:)
|
||||
1. Run `gulp prepublish`
|
||||
- Pulls latest, updates package.json minor version, updates changelog
|
||||
2. Verify that changelog changes and package.json update are correct (`git status` && `git diff`)
|
||||
3. Run [snapshot](#running-snapshot) & update if necessary
|
||||
4. Publish to npm: `npm publish ./dist`
|
||||
5. Commit and push
|
||||
6. Sit back and have a beer :beer: (or wine :wine_glass:)
|
||||
|
||||
### Releasing Component Demos
|
||||
See [ionic-preview-app](https://github.com/driftyco/ionic-preview-app#updating-ionic-site)
|
||||
|
Reference in New Issue
Block a user