From 4a8e7f93ce1ecb1d5789f9a2826ce81d3cf2869d Mon Sep 17 00:00:00 2001 From: Keenan Date: Wed, 13 Apr 2016 10:46:22 -0500 Subject: [PATCH 1/5] Updated ion-input doc typo clearInput property was on ion-item element instead of ion-input element in example --- ionic/components/input/input.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ionic/components/input/input.ts b/ionic/components/input/input.ts index 27f2dfe3c0..e76cc8f60f 100644 --- a/ionic/components/input/input.ts +++ b/ionic/components/input/input.ts @@ -55,8 +55,8 @@ import {Platform} from '../../platform/platform'; * * * - * - * + * + * * * ``` * From a089a97ab170d2b4b27dd06742cddc81de6eda30 Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Wed, 13 Apr 2016 09:17:29 -0500 Subject: [PATCH 2/5] chore(build): update publish.nightly gulp task to include building dist --- gulpfile.js | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 5bd20cb8bd..1162e70ee5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -723,25 +723,10 @@ gulp.task('release', ['publish.npm', 'publish.github']); * Pulls latest, ensures there are no unstaged/uncommitted changes, updates * package.json minor version and generates CHANGELOG for release. */ -gulp.task('prepare', function(){ - var execSync = require('child_process').execSync; - var spawnSync = require('child_process').spawnSync; +gulp.task('prepare', ['git-pull-latest'], function(){ var semver = require('semver'); var fs = require('fs'); var changelog = require('gulp-conventional-changelog'); - var self = this; - - //Check for uncommitted changes - var gitStatusResult = execSync('git status --porcelain'); - if (gitStatusResult.toString().length > 0) { - return fail('You have uncommitted changes, please stash or commit them before running prepare'); - } - - //Pull latest - var gitPullResult = spawnSync('git', ['pull', 'origin', '2.0']); - if (gitPullResult.status !== 0) { - fail('There was an error running \'git pull\':\n' + gitPullResult.stderr.toString()); - } //Update package.json version var packageJSON = require('./package.json'); @@ -754,15 +739,31 @@ gulp.task('prepare', function(){ preset: 'angular' })) .pipe(gulp.dest('./')); +}); - function fail(msg) { +gulp.task('git-pull-latest', function() { + var execSync = require('child_process').execSync; + var spawnSync = require('child_process').spawnSync; + + function fail(context, msg) { // remove gulp's 'Finished 'task' after 10ms' message - self.removeAllListeners('task_stop'); + context.removeAllListeners('task_stop'); console.error('Prepare aborted.'); console.error(msg); } + //Check for uncommitted changes + var gitStatusResult = execSync('git status --porcelain'); + if (gitStatusResult.toString().length > 0) { + return fail(this, 'You have uncommitted changes, please stash or commit them before running prepare'); + } + + //Pull latest + var gitPullResult = spawnSync('git', ['pull', 'origin', '2.0']); + if (gitPullResult.status !== 0) { + fail('There was an error running \'git pull\':\n' + gitPullResult.stderr.toString()); + } }); /** @@ -843,11 +844,14 @@ gulp.task('publish.npm', function(done) { }); }); +gulp.task('publish.nightly', ['build.release'], function(done){ + runSequence('git-pull-latest', 'nightly', done); +}); /** * Publishes a new tag to npm with a nightly tag. */ -gulp.task('publish.nightly', function(done) { +gulp.task('nightly', ['package'], function(done) { var fs = require('fs'); var spawn = require('child_process').spawn; var packageJSON = require('./package.json'); @@ -872,6 +876,8 @@ gulp.task('publish.nightly', function(done) { .concat(createUniqueHash()) .join('-'); + fs.writeFileSync('./package.json', JSON.stringify(packageJSON, null, 2)); + var npmCmd = spawn('npm', ['publish', '--tag=nightly', './dist']); npmCmd.stdout.on('data', function (data) { From c4eed03630dea8bc449cc2844e199a2a4c81c545 Mon Sep 17 00:00:00 2001 From: perry Date: Wed, 13 Apr 2016 13:19:51 -0500 Subject: [PATCH 3/5] chore(dgeni): make returns object macro a table instead of a list --- scripts/docs/templates/common.template.html | 29 ++++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/scripts/docs/templates/common.template.html b/scripts/docs/templates/common.template.html index 5a6675653f..15ca4cba13 100644 --- a/scripts/docs/templates/common.template.html +++ b/scripts/docs/templates/common.template.html @@ -24,10 +24,31 @@ angular_controller: APIDemoCtrl <@ endif @> <@- endmacro -@> <@ macro returnObject(params) -@> - <@- if params -@>
- <@- for param in params -@> - <$ param.type $> <$ param.key $> <$ param.description $>
- <@- endfor @> + <@- if params -@> + + + + + + + + + + <@ for param in params @> + + + + + + <@ endfor @> + +
PropertyTypeDetails
+ <$ param.key $> + + <$ param.type | code $> + + <$ param.description | marked $> +
<@- endif @> <@- endmacro -@> From 0bdeab62e2940a5a26589a88115c11e79c3d02c9 Mon Sep 17 00:00:00 2001 From: Ionitron Date: Wed, 13 Apr 2016 15:34:17 -0500 Subject: [PATCH 4/5] chore(CI): clear nightly dir before running dgeni to remove old dirs also add caching of ionic-site limit ionic-site clone depth use local gulp in node_modules Closes #439 --- circle.yml | 3 +++ scripts/ci/deploy.sh | 2 +- scripts/docs/deploy.sh | 26 +++++++++++++++++++------- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/circle.yml b/circle.yml index 60d75cf33d..059964c447 100644 --- a/circle.yml +++ b/circle.yml @@ -2,6 +2,9 @@ general: branches: ignore: - ins_n_outs +dependencies: + cache_directories: + - "~/ionic-site" # cache ionic-site machine: node: version: 4.1.0 diff --git a/scripts/ci/deploy.sh b/scripts/ci/deploy.sh index 5cfa54fe25..67a7b8b1f1 100755 --- a/scripts/ci/deploy.sh +++ b/scripts/ci/deploy.sh @@ -28,7 +28,7 @@ function run { fi # Install gulp globally for site deploy script. - npm install -g gulp + # npm install -g gulp if [[ "$IS_RELEASE" == "true" ]]; then echo "RELEASE DETECTED!" diff --git a/scripts/docs/deploy.sh b/scripts/docs/deploy.sh index f3ef689d28..a8c2a41fc6 100755 --- a/scripts/docs/deploy.sh +++ b/scripts/docs/deploy.sh @@ -12,10 +12,21 @@ function init { cd .. SITE_PATH=$(readJsonProp "config.json" "sitePath") SITE_DIR=$IONIC_DIR/$SITE_PATH + DOCS_DEST=$(readJsonProp "config.json" "docsDest") - ./git/clone.sh --repository="driftyco/ionic-site" \ - --directory="$SITE_DIR" \ - --branch="master" + if [ ! -d "$SITE_DIR" ]; then + echo "checking out" + ./git/clone.sh --repository="driftyco/ionic-site" \ + --directory="$SITE_DIR" \ + --branch="master" \ + --depth=1 + else + echo "using existing" + cd $SITE_DIR + git reset --hard + git pull origin master + cd $IONIC_DIR/scripts + fi } function run { @@ -23,14 +34,15 @@ function run { VERSION=$(readJsonProp "package.json" "version") #compile API Demos - gulp demos --production=true + ./node_modules/.bin/gulp demos --production=true # process new docs - gulp docs --doc-version="$VERSION_NAME" + rm -R $DOCS_DEST/api + ./node_modules/.bin/gulp docs --doc-version="$VERSION_NAME" # compile sass vars json for ionic-site docs - gulp docs.sass-variables - cp tmp/sass.json $SITE_DIR/docs/v2/theming/overriding-ionic-variables/ + ./node_modules/.bin/gulp docs.sass-variables + cp tmp/sass.json $DOCS_DEST/theming/overriding-ionic-variables/ # CD in to the site dir to commit updated docs cd $SITE_DIR From ade93371a4e7050539297a59ba91cfe9a38fdfe1 Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Wed, 13 Apr 2016 15:40:20 -0500 Subject: [PATCH 5/5] chore(build): add tslint and unit tests to prerelease gulp task closes #5755 --- gulpfile.js | 36 +++++++++++++++++++++++++----------- ionic/components/img/img.ts | 2 +- ionic/platform/platform.ts | 4 ++-- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 1162e70ee5..a57798c09a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -689,9 +689,16 @@ function buildDemoSass(isProductionMode) { require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig); // requires bundle.system to be run once -gulp.task('karma', ['tests'], function() { +gulp.task('karma', ['tests'], function(done) { var karma = require('karma').server; - return karma.start({ configFile: __dirname + '/scripts/karma/karma.conf.js' }) + karma.start({ + configFile: __dirname + '/scripts/karma/karma.conf.js' + }, function(result) { + if (result > 0) { + return done(new Error('Karma exited with an error')); + } + done(); + }); }); gulp.task('karma-watch', ['watch.tests', 'bundle.system'], function() { @@ -710,8 +717,15 @@ gulp.task('karma-watch', ['watch.tests', 'bundle.system'], function() { * some prerelease magic (see 'prepare') and copies npm package and tooling * files to dist. */ -gulp.task('prerelease', ['prepare', 'build.release'], function(done){ - runSequence('package', done); +gulp.task('prerelease', function(done){ + runSequence( + 'tslint', + 'prepare', + 'build.release', + 'karma', + 'package', + done + ); }); /** @@ -931,11 +945,11 @@ gulp.task('tooling', function(){ /** * TS LINT */ -gulp.task("tslint", function() { - var tslint = require("gulp-tslint"); - gulp.src([ - 'ionic/**/*.ts', - '!ionic/**/test/**/*', - ]).pipe(tslint()) - .pipe(tslint.report('verbose')); +gulp.task('tslint', function(done) { + var tslint = require('gulp-tslint'); + return gulp.src([ + 'ionic/**/*.ts', + '!ionic/**/test/**/*', + ]).pipe(tslint()) + .pipe(tslint.report('verbose')); }); diff --git a/ionic/components/img/img.ts b/ionic/components/img/img.ts index c2b49f30c3..45a6ca04d8 100644 --- a/ionic/components/img/img.ts +++ b/ionic/components/img/img.ts @@ -84,7 +84,7 @@ export class Img { } private _loaded(isLoaded: boolean) { - this._elementRef.nativeElement.classList[isLoaded ? 'add': 'remove']('img-loaded'); + this._elementRef.nativeElement.classList[isLoaded ? 'add' : 'remove']('img-loaded'); } enable(shouldEnable: boolean) { diff --git a/ionic/platform/platform.ts b/ionic/platform/platform.ts index 9655e9258c..b1ace1d408 100644 --- a/ionic/platform/platform.ts +++ b/ionic/platform/platform.ts @@ -190,7 +190,7 @@ export class Platform { triggerReady() { this._zone.run(() => { this._readyResolve(); - }) + }); } /** @@ -741,5 +741,5 @@ export interface PlatformVersion { str?: string; num?: number; major?: number; - minor?: number + minor?: number; }