chore(): steps to run local npm ionic-framework

This commit is contained in:
Adam Bradley
2016-02-02 16:34:29 -06:00
parent de952e3cbb
commit 8f44076169
2 changed files with 27 additions and 5 deletions

View File

@ -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());
} }

View File

@ -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`