Merge remote-tracking branch 'remotes/angular.io/master' into merge-review-rex

# Conflicts:
#	public/_includes/_hero-home.jade
This commit is contained in:
rexebin 2016-11-05 14:23:51 +00:00
commit 5c46ddf7a7
18 changed files with 209 additions and 124 deletions

View File

@ -1,6 +1,8 @@
{
"projects": {
"live": "angular-io",
"ngdocsdev": "ngdocsdev"
"ngdocsdev": "ngdocsdev",
"kw-dev": "kw-angular-io",
"dev": "angular-io-dev"
}
}

View File

@ -1,75 +1,76 @@
{
"firebase": "angular-io",
"public": "www",
"rewrites": [
{
"source": "/docs/dart/latest/testing",
"destination":"/docs/dart/latest/guide/testing.html"
},
{
"source": "/docs/dart/latest/tutorial",
"destination": "/docs/dart/latest/index.html"
},
{
"source": "/docs/js/latest/testing",
"destination": "/docs/js/latest/guide/testing.html"
},
{
"source": "/docs/js/latest/tutorial",
"destination": "/docs/js/latest/index.html"
},
{
"source": "/docs/ts/latest/guide/setup.html",
"destination": "/docs/ts/latest/index.html"
},
{
"source": "/docs/ts/latest/testing",
"destination": "/docs/ts/latest/guide/testing.html"
},
{
"source": "/cheatsheet",
"destination": "/docs/ts/latest/guide/cheatsheet.html"
},
{
"source": "/cheatsheet.json",
"destination": "/docs/ts/latest/guide/cheatsheet.json"
},
{
"source": "/AngularCheatSheet_Letter.pdf",
"destination": "/docs/ts/latest/guide/AngularCheatSheet_Letter.pdf"
},
{
"source": "/AngularCheatSheet_Poster.pdf",
"destination": "/docs/ts/latest/guide/AngularCheatSheet_Poster.pdf"
},
{
"source": "/cardboard",
"destination": "/cardboard/index.html"
},
{
"source": "/license",
"destination": "/license.txt"
},
{
"source": "/events",
"destination": "/events.html"
},
{
"source": "/survey",
"destination": "/survey.html"
},
{
"source": "/dart",
"destination": "/docs/dart/latest/index.html"
},
{
"source": "/styleguide",
"destination": "/docs/ts/latest/guide/style-guide.html"
}
],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
"hosting": {
"public": "www",
"rewrites": [
{
"source": "/docs/dart/latest/testing",
"destination": "/docs/dart/latest/guide/testing.html"
},
{
"source": "/docs/dart/latest/tutorial",
"destination": "/docs/dart/latest/index.html"
},
{
"source": "/docs/js/latest/testing",
"destination": "/docs/js/latest/guide/testing.html"
},
{
"source": "/docs/js/latest/tutorial",
"destination": "/docs/js/latest/index.html"
},
{
"source": "/docs/ts/latest/guide/setup.html",
"destination": "/docs/ts/latest/index.html"
},
{
"source": "/docs/ts/latest/testing",
"destination": "/docs/ts/latest/guide/testing.html"
},
{
"source": "/cheatsheet",
"destination": "/docs/ts/latest/guide/cheatsheet.html"
},
{
"source": "/cheatsheet.json",
"destination": "/docs/ts/latest/guide/cheatsheet.json"
},
{
"source": "/AngularCheatSheet_Letter.pdf",
"destination": "/docs/ts/latest/guide/AngularCheatSheet_Letter.pdf"
},
{
"source": "/AngularCheatSheet_Poster.pdf",
"destination": "/docs/ts/latest/guide/AngularCheatSheet_Poster.pdf"
},
{
"source": "/cardboard",
"destination": "/cardboard/index.html"
},
{
"source": "/license",
"destination": "/license.txt"
},
{
"source": "/events",
"destination": "/events.html"
},
{
"source": "/survey",
"destination": "/survey.html"
},
{
"source": "/dart",
"destination": "/docs/dart/latest/index.html"
},
{
"source": "/styleguide",
"destination": "/docs/ts/latest/guide/style-guide.html"
}
],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}

View File

@ -14,6 +14,7 @@ var fsExtra = require('fs-extra');
var fs = fsExtra;
var exec = require('child_process').exec;
var execPromise = Q.denodeify(exec);
var execSync = require('child_process').execSync;
// cross platform version of spawn that also works on windows.
var xSpawn = require('cross-spawn');
var prompt = require('prompt');
@ -636,7 +637,7 @@ gulp.task('build-dart-api-docs', ['_shred-api-examples', 'dartdoc'], function()
return buildApiDocsForDart();
});
// Using the --build flag will use systemjs.config.plunker.build.js (for preview builds)
// Using the --build flag will use systemjs.config.web.build.js (for preview builds)
gulp.task('build-plunkers', ['_copy-example-boilerplate'], function() {
regularPlunker.buildPlunkers(EXAMPLES_PATH, LIVE_EXAMPLES_PATH, { errFn: gutil.log, build: argv.build });
return embeddedPlunker.buildPlunkers(EXAMPLES_PATH, LIVE_EXAMPLES_PATH, { errFn: gutil.log, build: argv.build, targetSelf: argv.targetSelf });
@ -744,7 +745,7 @@ gulp.task('build-compile', ['build-docs'], function() {
return harpCompile();
});
gulp.task('check-deploy', ['build-docs'], function() {
gulp.task('check-deploy', ['firebase-use-proj-check', 'build-docs'], () => {
return harpCompile().then(function() {
gutil.log('compile ok');
gutil.log('running live server ...');
@ -753,7 +754,7 @@ gulp.task('check-deploy', ['build-docs'], function() {
}).then(function(shouldDeploy) {
if (shouldDeploy) {
gutil.log('deploying...');
return execPromise('firebase deploy');
return execPromise(`firebase deploy -p ${WWW}`);
} else {
return ['Not deploying'];
}
@ -764,6 +765,17 @@ gulp.task('check-deploy', ['build-docs'], function() {
});
});
gulp.task('firebase-use-proj-check', cb => {
try {
execSync('firebase use');
} catch (e) {
// Rerun command so user gets project + alias info
execSync('firebase use', {stdio:[0,1,2]});
throw `\nAborting: no firebase project selected. Run:\n\n firebase use <project-or-alias-name>\n\n`;
}
return cb();
});
gulp.task('test-api-builder', function (cb) {
execCommands(['npm run test-api-builder'], {}, cb);
});
@ -808,7 +820,7 @@ gulp.task('_harp-compile', function() {
gulp.task('_shred-devguide-examples', ['_shred-clean-devguide', '_copy-example-boilerplate'], function() {
// Split big shredding task into partials 2016-06-14
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['/node_modules']});
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['**/node_modules', '**/_boilerplate']});
var promise = Promise.resolve(true);
examplePaths.forEach(function (examplePath) {
promise = promise.then(() => docShredder.shredSingleExampleDir(_devguideShredOptions, examplePath));
@ -1071,7 +1083,6 @@ function backupApiHtmlFilesExist(folderName) {
}
function harpJsonSetJade2NgTo(v) {
const execSync = require('child_process').execSync;
const harpJsonPath = path.join(ANGULAR_IO_PROJECT_PATH, 'harp.json');
execSync(`perl -pi -e 's/("jade2ng": *)\\w+/$1${v}/' ${harpJsonPath}`);
const harpJson = require(harpJsonPath);
@ -1208,10 +1219,12 @@ function watchAndSync(options, cb) {
// returns a promise;
function askDeploy() {
// Show user what the currently active firebase project is:
execSync('firebase use', {stdio:[0,1,2]});
prompt.start();
var schema = {
name: 'shouldDeploy',
description: 'Deploy to Firebase? (y/n)',
description: `Deploy ${WWW} to firebase? (y/n)`,
type: 'string',
pattern: /Y|N|y|n/,
message: "Respond with either a 'y' or 'n'",

View File

@ -48,7 +48,7 @@
"gulp-tslint": "^5.0.0",
"gulp-util": "^3.0.6",
"gulp-watch": "^4.3.4",
"harp": "0.21.0-pre.1",
"harp": "^0.21.0",
"html2jade": "^0.8.4",
"indent-string": "^2.1.0",
"jasmine-core": "^2.3.4",

View File

@ -10,3 +10,7 @@ header(class="background-sky l-relative")
img(src="/translate/cn/gdd.svg" width="64")
p <strong>2016 Google 开发者大会来啦!(北京 & 上海)</strong>
a(href="http://www.google.cn/intl/zh-CN/events/developerday2016/" target="_blank" class="button md-button") 立即报名
img(src="/resources/images/logos/anglebrackets/devintersection.png" width="64")
p 参加<strong>DEVintersection Amsterdam</strong> 11月 14-16号
a(href="https://www.devintersectioneurope.com/#!/" target="_blank" class="button md-button") 立即报名

View File

@ -1,5 +1,5 @@
/**
* PLUNKER VERSION FOR CURRENT ANGULAR BUILD
* WEB VERSION FOR CURRENT ANGULAR BUILD
* (based on systemjs.config.js in angular.io)
* System configuration for Angular samples
* Adjust as necessary for your application needs.
@ -11,7 +11,19 @@
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
transpiler: 'ts',
typescriptOptions: {
tsconfig: true
// Complete copy of compiler options in standard tsconfig.json
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"../../node_modules/@types/"
]
},
meta: {
'typescript': {
@ -67,4 +79,26 @@
}
}
});
if (!global.noBootstrap) { bootstrap(); }
// Bootstrap the `AppModule`(skip the `app/main.ts` that normally does this)
function bootstrap() {
// Stub out `app/main.ts` so System.import('app') doesn't fail if called in the index.html
System.set(System.normalizeSync('app/main.ts'), System.newModule({ }));
// bootstrap and launch the app (equivalent to standard main.ts)
Promise.all([
System.import('@angular/platform-browser-dynamic'),
System.import('app/app.module')
])
.then(function (imports) {
var platform = imports[0];
var app = imports[1];
platform.platformBrowserDynamic().bootstrapModule(app.AppModule);
})
.catch(function(err){ console.error(err); });
}
})(this);

View File

@ -1,5 +1,5 @@
/**
* PLUNKER VERSION
* WEB ANGULAR VERSION
* (based on systemjs.config.js in angular.io)
* System configuration for Angular samples
* Adjust as necessary for your application needs.
@ -9,7 +9,19 @@
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
transpiler: 'ts',
typescriptOptions: {
tsconfig: true
// Complete copy of compiler options in standard tsconfig.json
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"../../node_modules/@types/"
]
},
meta: {
'typescript': {
@ -54,4 +66,26 @@
}
}
});
if (!global.noBootstrap) { bootstrap(); }
// Bootstrap the `AppModule`(skip the `app/main.ts` that normally does this)
function bootstrap() {
// Stub out `app/main.ts` so System.import('app') doesn't fail if called in the index.html
System.set(System.normalizeSync('app/main.ts'), System.newModule({ }));
// bootstrap and launch the app (equivalent to standard main.ts)
Promise.all([
System.import('@angular/platform-browser-dynamic'),
System.import('app/app.module')
])
.then(function (imports) {
var platform = imports[0];
var app = imports[1];
platform.platformBrowserDynamic().bootstrapModule(app.AppModule);
})
.catch(function(err){ console.error(err); });
}
})(this);

View File

@ -12,7 +12,6 @@ transformers:
- angular2:
platform_directives:
- 'package:angular2/common.dart#COMMON_DIRECTIVES'
- 'package:angular2/common.dart#FORM_DIRECTIVES'
platform_pipes:
- 'package:angular2/common.dart#COMMON_PIPES'
entry_points: web/main.dart

View File

@ -12,7 +12,6 @@ transformers:
- angular2:
platform_directives:
- 'package:angular2/common.dart#COMMON_DIRECTIVES'
- 'package:angular2/common.dart#FORM_DIRECTIVES'
platform_pipes:
- 'package:angular2/common.dart#COMMON_PIPES'
entry_points: web/main.dart

View File

@ -33,6 +33,8 @@ System.config({
},
});
document['noBootstrap'] = true; // do not run system.config.web.js bootstrap
System.import('systemjs.config.js')
.then(importSystemJsExtras)
.then(initTestBed)

View File

@ -1940,7 +1940,7 @@ a(href="#toc") 回到顶部
style-guide/ts/04-10/app/shared/filter-text/filter-text.component.ts,
style-guide/ts/04-10/app/shared/filter-text/filter-text.service.ts,
style-guide/ts/04-10/app/heroes/heroes.component.ts,
style-guide/ts/04-10/app/heroes/heroes.component.html,
style-guide/ts/04-10/app/heroes/heroes.component.html
`,
`,,,`,
`app/shared/shared.module.ts,
@ -1948,7 +1948,7 @@ a(href="#toc") 回到顶部
app/shared/filter-text/filter-text.component.ts,
app/shared/filter-text/filter-text.service.ts,
app/heroes/heroes.component.ts,
app/heroes/heroes.component.html,
app/heroes/heroes.component.html
`)
:marked

View File

@ -39,12 +39,34 @@ table.is-full-width
td Paris, France
td Dec. 5, 2016
<!-- NG-BE -->
<!-- GDD Beijing -->
tr
th
a(
target="_blank"
href="https://ng-be.org/"
) NG-BE
td Ghent, Belgium
td Dec. 9, 2016
href="http://www.google.cn/intl/en/events/developerday2016/"
) Google Developer Day China (Beijing)
td Beijing, China
td Dec. 8, 2016
<!-- NG-BE -->
tr
th
a(
target="_blank"
href="https://ng-be.org/"
) NG-BE
td Ghent, Belgium
td Dec. 9, 2016
<!-- GDD Shanghai -->
tr
th
a(
target="_blank"
href="http://www.google.cn/intl/en/events/developerday2016/"
) Google Developer Day China (Shanghai)
td Shanghai, China
td Dec. 14, 2016

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -1,8 +1,5 @@
# Comments & blank lines are ignored. Entry format (make pattern as specific as possible):
# <grep-pattern-to-match-file-path> # reason / issue number
/[jt]s/.*/api/router-deprecated/ # Obsolete API entries. No issue open yet.
/ts/latest/guide/style-guide.html # https://github.com/angular/angular.io/issues/2123
/ts/latest/guide/upgrade.html # In a transient state until RC6 - @filipe.silva
/[jt]s/.*/api/forms/index/NG_VALIDATORS-let.html # RC6 contains broken example tags
/dart/latest/tutorial/toh-pt5.html

View File

@ -16,9 +16,6 @@ fi
echo "Installing main packages ..."
npm install --no-optional
echo "Patching ..."
source ./scripts/patch.sh
if [ -z "$TRAVIS" ]; then
echo "Rebuilding node-sass, just in case ..."
npm rebuild node-sass;

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
set -e -o pipefail
TARGET=node_modules/terraform/lib/helpers/raw.js
# Around line 282 change from/to:
# var namespace = sourcePath.split(".")[0].split("/")
# var namespace = sourcePath.split('.').slice(0, -1).join('.').split('/')
if [ -e "$TARGET" ]; then
perl -i.bak -pe 's/^(\s+var namespace.*split\("."\))\[0\]/\1.slice(0, -1).join(".")/' "$TARGET"
echo "Patched '$TARGET'."
else
echo "Nothing to patch. Can't find file '$TARGET'."
exit 1;
fi

View File

@ -4,7 +4,7 @@ var del = require('del');
var Dgeni = require('dgeni');
var _ = require('lodash');
var globby = require('globby');
var ignoreDirs = ['**/node_modules/**', '**/dist/**'];
var ignoreDirs = ['**/node_modules/**', '**/dist/**', '**/dart/**/build/**', '**/.pub/**'];
var _getLogLevel = function (options) { return options.logLevel || 'info'; }

View File

@ -41,7 +41,6 @@ class PlunkerBuilder {
if (config.basePath.indexOf('/ts') > -1) {
// uses systemjs.config.js so add plunker version
this.options.addField(postData, 'systemjs.config.js', this.systemjsConfig);
this.options.addField(postData, 'tsconfig.json', this.tsconfig);
}
}
@ -210,13 +209,12 @@ class PlunkerBuilder {
_getPlunkerFiles() {
// Assume plunker version is sibling of node_modules version
this.readme = fs.readFileSync(this.basePath + '/_boilerplate/plunker.README.md', 'utf-8');
var systemJsConfigPath = '/_boilerplate/systemjs.config.plunker.js';
var systemJsConfigPath = '/_boilerplate/systemjs.config.web.js';
if (this.options.build) {
systemJsConfigPath = '/_boilerplate/systemjs.config.plunker.build.js';
systemJsConfigPath = '/_boilerplate/systemjs.config.web.build.js';
}
this.systemjsConfig = fs.readFileSync(this.basePath + systemJsConfigPath, 'utf-8');
this.systemjsConfig += this.copyrights.jsCss;
this.tsconfig = fs.readFileSync(`${this.basePath}/_boilerplate/tsconfig.json`, 'utf-8');
}
_htmlToElement(document, html) {
@ -255,8 +253,8 @@ class PlunkerBuilder {
}
});
// var defaultExcludes = [ '!**/node_modules/**','!**/tsconfig.json', '!**/*plnkr.json', '!**/*plnkr.html', '!**/*plnkr.no-link.html' ];
var defaultExcludes = [
'!**/app/main.ts',
'!**/tsconfig.json',
'!**/*plnkr.*',
'!**/package.json',