mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(): steps to run local npm ionic-framework
This commit is contained in:
@ -15,7 +15,7 @@ var connect = require('gulp-connect');
|
|||||||
var docsConfig = require('./scripts/config.json');
|
var docsConfig = require('./scripts/config.json');
|
||||||
|
|
||||||
var flagConfig = {
|
var flagConfig = {
|
||||||
string: ['port', 'version', 'ngVersion', 'animations'],
|
string: ['port', 'version', 'ngVersion', 'animations', 'strip-debug'],
|
||||||
boolean: ['dry-run'],
|
boolean: ['dry-run'],
|
||||||
alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
|
alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
|
||||||
default: { port: 8000 }
|
default: { port: 8000 }
|
||||||
@ -154,9 +154,10 @@ function tsCompile(options, cacheName){
|
|||||||
gulp.task('transpile.no-typecheck', function(){
|
gulp.task('transpile.no-typecheck', function(){
|
||||||
var gulpif = require('gulp-if');
|
var gulpif = require('gulp-if');
|
||||||
var stripDebug = require('gulp-strip-debug');
|
var stripDebug = require('gulp-strip-debug');
|
||||||
|
var shouldStripDebug = (IS_RELEASE && flags['strip-debug'] !== 'false');
|
||||||
|
|
||||||
return tsCompile(tscOptionsNoTypeCheck, 'no-typecheck')
|
return tsCompile(tscOptionsNoTypeCheck, 'no-typecheck')
|
||||||
.pipe(gulpif(IS_RELEASE, stripDebug()))
|
.pipe(gulpif(shouldStripDebug, stripDebug()))
|
||||||
.pipe(gulp.dest('dist'));
|
.pipe(gulp.dest('dist'));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -165,12 +166,13 @@ gulp.task('typecheck', ['transpile.typecheck']);
|
|||||||
gulp.task('transpile.typecheck', function(){
|
gulp.task('transpile.typecheck', function(){
|
||||||
var merge = require('merge2');
|
var merge = require('merge2');
|
||||||
var stripDebug = require('gulp-strip-debug');
|
var stripDebug = require('gulp-strip-debug');
|
||||||
|
var shouldStripDebug = (IS_RELEASE && flags['strip-debug'] !== 'false');
|
||||||
|
|
||||||
var result = tsCompile(tscOptions, 'typecheck');
|
var result = tsCompile(tscOptions, 'typecheck');
|
||||||
|
|
||||||
var js = result.js;
|
var js = result.js;
|
||||||
var dts = result.dts;
|
var dts = result.dts;
|
||||||
if (IS_RELEASE) {
|
if (shouldStripDebug) {
|
||||||
js = js.pipe(stripDebug());
|
js = js.pipe(stripDebug());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,26 @@
|
|||||||
2. `gulp docs --doc-version=2.0.0` to build a specific API version
|
2. `gulp docs --doc-version=2.0.0` to build a specific API version
|
||||||
|
|
||||||
|
|
||||||
|
### Building NPM Module for Local Testing
|
||||||
|
|
||||||
|
From `ionic` repo root directory:
|
||||||
|
|
||||||
|
1. `gulp package --strip-debug false`
|
||||||
|
2. `cd dist`
|
||||||
|
3. `sudo npm link`
|
||||||
|
4. After ionic changes: `gulp transpile.no-typecheck --strip-debug false`
|
||||||
|
|
||||||
|
From Testing App root directory:
|
||||||
|
|
||||||
|
1. `npm link ionic-framework`
|
||||||
|
2. `ionic serve` or `ionic run` or whatever
|
||||||
|
|
||||||
|
When done:
|
||||||
|
|
||||||
|
1. In testing app, `npm uninstall ionic-framework`
|
||||||
|
2. In ionic repo, `sudo gulp clean`
|
||||||
|
|
||||||
|
|
||||||
### Running Snapshot
|
### Running Snapshot
|
||||||
|
|
||||||
1. Install [Protractor](https://angular.github.io/protractor/#/): `npm install -g protractor`
|
1. Install [Protractor](https://angular.github.io/protractor/#/): `npm install -g protractor`
|
||||||
@ -75,6 +95,6 @@
|
|||||||
|
|
||||||
|
|
||||||
### Releasing API Demos
|
### Releasing API Demos
|
||||||
Ionic API demos are automatically compiled and deployed to the [ionic staging site](http://ionic-site-staging.herokuapp.com/) on every commit. No action is necessary.
|
Ionic API demos are automatically compiled and deployed to the [ionic staging site](http://ionic-site-staging.herokuapp.com/) on every commit. No action is necessary.
|
||||||
|
|
||||||
If you'd like to manually update the demos, clone the [`ionic-site`](https://github.com/driftyco/ionic-site) repo as a sibling of `ionic`. From `ionic` run gulp docs, and it'll compile and copy the demos to the `ionic-site` repo, ready for testing or committing.
|
If you'd like to manually update the demos, clone the [`ionic-site`](https://github.com/driftyco/ionic-site) repo as a sibling of `ionic`. From `ionic` run gulp docs, and it'll compile and copy the demos to the `ionic-site` repo, ready for testing or committing.
|
||||||
|
Reference in New Issue
Block a user