mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +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 execSync = require('child_process').execSync;
|
||||||
var spawnSync = require('child_process').spawnSync;
|
var spawnSync = require('child_process').spawnSync;
|
||||||
var semver = require('semver');
|
var semver = require('semver');
|
||||||
@ -510,26 +510,8 @@ gulp.task('!prepare', function(){
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('prepare', ['package', '!prepare']);
|
gulp.task('prepublish', ['prepare'], function(done){
|
||||||
|
runSequence('package', done);
|
||||||
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();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
require('./scripts/docs/gulp-tasks')(gulp, flags)
|
require('./scripts/docs/gulp-tasks')(gulp, flags)
|
||||||
|
@ -49,11 +49,13 @@
|
|||||||
|
|
||||||
### Releasing Ionic Source
|
### Releasing Ionic Source
|
||||||
|
|
||||||
1. Pull latest code
|
1. Run `gulp prepublish`
|
||||||
2. Run [snapshot](#running-snapshot) & update if necessary
|
- Pulls latest, updates package.json minor version, updates changelog
|
||||||
3. Bump version in package.json
|
2. Verify that changelog changes and package.json update are correct (`git status` && `git diff`)
|
||||||
4. `gulp publish`
|
3. Run [snapshot](#running-snapshot) & update if necessary
|
||||||
5. Sit back and have a beer :beer: (or wine :wine_glass:)
|
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
|
### Releasing Component Demos
|
||||||
See [ionic-preview-app](https://github.com/driftyco/ionic-preview-app#updating-ionic-site)
|
See [ionic-preview-app](https://github.com/driftyco/ionic-preview-app#updating-ionic-site)
|
||||||
|
Reference in New Issue
Block a user