Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 760658d

Browse files
kwalraththelgevold
authored andcommitted
docs(TOH-HTTP): TOH Http chapter
closes #972 chore(toh): change inputs array for input decorator/hero now a class docs(dart): update to b12 Also update dart_to_js_script_rewriter dependency to ^1.0.1, and change most angular2.dart imports to be core.dart instead. The pipes example broke without the angular2.dart import, so I let it be. The server-communication sample has never worked for me, so I changed it but might have broken it further. closes #1007 docs: update to style-guide links closes #995 Fixed links to John Papa style guide to new repo location. docs(cb-ts-to-js): add cookbook about applying TypeScript examples to ES5 closes #893 docs(dart): change imports from bootstrap.dart to platform/browser.dart closes #1013 samples(dart): add info file for dart-doc-syncer to template-syntax closes #1018 samples(dart): add link to documentation chapter closes #1019 docs(toh-1): remove public access modifiers closes #1009 Remove public access modifier on AppComponent properties to be consistent throughout code tutorial docs(dependency-injection): tweak Dart wording closes #1017 docs(dart): tweak homepage banner closes #1016 docs(quickstart): fixed "hurray" typo. closes #1021 docs: update to beta.13 docs(dart/quickstart): merge 2 examples into 1 closes #1031 docs(dart): update to beta.13.1 closes #1032 Add additional tags to the angular.io dgeni package for the new api doc style proposal. Closes #1030 chore: remove angulardart.org link from footer closes #1034 fix(api-builder): add missing git package dependency This was causing the api-builder tests to fail chore(typo): quide -> guide in cheatsheets closes #1039 docs:Create Tour of Heroes chapter on http some text changes wired up web api text adding saving wired up CRUD remove unused files fixed toggle whitespace text text text updates text text tweaks added tests test fixed button click images fixed test tweaks docs(toh): add missing nav path to diagram per #1041 chore: fix typo in ts-to-js intro closes #1025 chore(bio): add Deborah's bio closes #1024 docs(bio): fixes Jules' bio links closes #1027 fix(e2e): fix race condition docs(toh-4): reword the getHeroesSlowly instructions closes #1011 rewording to: "replace `_heroService.getHeroes` with `_heroService.getHeroesSlowly`" docs: add DI cookbook chore: replace VSCode-specific settings.json with broadly recommended .editorconfig closes #1022 docs(template-syntax): fixed "a id" typo in basics section. closes #1048 chore: add "homepage" property to package.json closes #1038 docs(testing): update testing to use toh-5 closes #1003 docs(unit-testing): fix the path to node_modules & steps for adding a new spec closes #1043 package(harp): update harp version to fix async errors docs(component-styles): add chapter about styling components closes #1047 docs(lifecycle-hooks): Fixed missing ":marked" typo closes #1051 docs(todo app): replace remaining tasks reduce func with filter.length closes #1050 docs(component-styles): mark `__moduleName` experimental; use alert instead of callout. closes #1054 docs(pipes): Fixed "If follows..." typo closes #1053 Fixed typo in **pipes** section of guide. chore: update to beta.14
1 parent e178214 commit 760658d

File tree

370 files changed

+7393
-1622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

370 files changed

+7393
-1622
lines changed

.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
13+
[*.md]
14+
max_line_length = 0
15+
trim_trailing_whitespace = false
16+
17+
[*.jade]
18+
max_line_length = 0
19+
trim_trailing_whitespace = false
20+
21+
# Indentation override
22+
#[lib/**.js]
23+
#[{package.json,.travis.yml}]
24+
#[**/**.js]

.vscode/settings.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

gulpfile.js

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){
6969
});
7070

7171
var _exampleBoilerplateFiles = [
72-
'karma.conf.js',
73-
'karma-test-shim.js',
74-
'package.json',
75-
'styles.css',
76-
'tsconfig.json',
77-
'typings.json'
72+
'.editorconfig',
73+
'karma.conf.js',
74+
'karma-test-shim.js',
75+
'package.json',
76+
'styles.css',
77+
'tsconfig.json',
78+
'tslint.json',
79+
'typings.json'
7880
];
7981

8082
var _exampleDartWebBoilerPlateFiles = ['styles.css'];
@@ -153,14 +155,17 @@ function findAndRunE2eTests(filter) {
153155
// to the outputFile.
154156
function runE2eTests(appDir, protractorConfigFilename, outputFile ) {
155157
// start the app
156-
var appRunSpawnInfo = spawnExt('npm',['run','http-server', '--', '-s' ], { cwd: appDir });
157-
158-
// start protractor
159-
var pcFilename = path.resolve(protractorConfigFilename); // need to resolve because we are going to be running from a different dir
160-
var exePath = path.join(process.cwd(), "./node_modules/.bin/");
161-
var spawnInfo = spawnExt('protractor',
162-
[ pcFilename, '--params.appDir=' + appDir, '--params.outputFile=' + outputFile], { cwd: exePath });
163-
return spawnInfo.promise.then(function(data) {
158+
var appRunSpawnInfo = spawnExt('npm',['run','http-server:e2e', '--', '-s' ], { cwd: appDir });
159+
var tscRunSpawnInfo = spawnExt('npm',['run','tsc'], { cwd: appDir });
160+
161+
return tscRunSpawnInfo.promise.then(function(data) {
162+
// start protractor
163+
var pcFilename = path.resolve(protractorConfigFilename); // need to resolve because we are going to be running from a different dir
164+
var exePath = path.join(process.cwd(), "./node_modules/.bin/");
165+
var spawnInfo = spawnExt('protractor',
166+
[ pcFilename, '--params.appDir=' + appDir, '--params.outputFile=' + outputFile], { cwd: exePath });
167+
return spawnInfo.promise;
168+
}).then(function(data) {
164169
// kill the app now that protractor has completed.
165170
// Ugh... proc.kill does not work properly on windows with child processes.
166171
// appRun.proc.kill();
@@ -243,14 +248,14 @@ gulp.task('add-example-boilerplate', function() {
243248
gutil.log("symlinking " + linkPath + ' -> ' + realPath)
244249
fsUtils.addSymlink(realPath, linkPath);
245250
});
246-
251+
247252
realPath = path.join(EXAMPLES_PATH, '/typings');
248253
var typingsPaths = getTypingsPaths(EXAMPLES_PATH);
249254
typingsPaths.forEach(function(linkPath) {
250-
gutil.log("symlinking " + linkPath + ' -> ' + realPath)
255+
gutil.log("symlinking " + linkPath + ' -> ' + realPath)
251256
fsUtils.addSymlink(realPath, linkPath);
252257
});
253-
258+
254259
return copyExampleBoilerplate();
255260
});
256261

@@ -263,7 +268,7 @@ function copyExampleBoilerplate() {
263268
return path.join(EXAMPLES_PATH, fn);
264269
});
265270
var examplePaths = getExamplePaths(EXAMPLES_PATH);
266-
271+
267272
var dartWebSourceFiles = _exampleDartWebBoilerPlateFiles.map(function(fn){
268273
return path.join(EXAMPLES_PATH, fn);
269274
});
@@ -287,15 +292,15 @@ gulp.task('remove-example-boilerplate', function() {
287292
nodeModulesPaths.forEach(function(linkPath) {
288293
fsUtils.removeSymlink(linkPath);
289294
});
290-
295+
291296
var typingsPaths = getTypingsPaths(EXAMPLES_PATH);
292297
typingsPaths.forEach(function(linkPath) {
293298
fsUtils.removeSymlink(linkPath);
294-
});
295-
299+
});
300+
296301
var examplePaths = getExamplePaths(EXAMPLES_PATH);
297302
var dartExampleWebPaths = getDartExampleWebPaths(EXAMPLES_PATH);
298-
303+
299304
return deleteFiles(_exampleBoilerplateFiles, examplePaths)
300305
.then(function() {
301306
return deleteFiles(_exampleDartWebBoilerPlateFiles, dartExampleWebPaths);
@@ -346,7 +351,7 @@ gulp.task('build-js-api-docs', ['_shred-api-examples'], function() {
346351
});
347352

348353
gulp.task('build-plunkers', function() {
349-
return copyExampleBoilerplate()
354+
return copyExampleBoilerplate()
350355
.then(function() {
351356
return plunkerBuilder.buildPlunkers(EXAMPLES_PATH, LIVE_EXAMPLES_PATH, { errFn: gutil.log });
352357
});
@@ -501,7 +506,7 @@ function harpCompile() {
501506
vars: { NODE_ENV: "production" }
502507
});
503508
gutil.log("NODE_ENV: " + process.env.NODE_ENV);
504-
509+
505510
var deferred = Q.defer();
506511
gutil.log('running harp compile...');
507512
showHideExampleNodeModules('hide');
@@ -523,20 +528,20 @@ function harpCompile() {
523528
}
524529

525530
function linkChecker(options) {
526-
var deferred = Q.defer();
531+
var deferred = Q.defer();
527532
var options = options || {};
528-
533+
529534
var blcOptions = options.blcOptions || {};
530535
var customData = options.customData || {};
531-
536+
532537
var excludeBad; // don't bother reporting bad links matching this RegExp
533538
if (argv.excludeBad) {
534539
excludeBad = new RegExp(argv.excludeBad);
535540
} else {
536541
excludeBad = options.excludeBad === undefined ? /docs\/dart\/latest\/api/ : '';
537542
}
538-
539-
var previousPage;
543+
544+
var previousPage;
540545
var siteUrl = argv.url || options.url || 'https://angular.io/';
541546

542547
// See https://github.com/stevenvachon/broken-link-checker#blcsitecheckeroptions-handlers
@@ -546,12 +551,12 @@ function linkChecker(options) {
546551
//gutil.log('Scanning ' + pageUrl);docs/ts/latest/api/core/
547552
},
548553
junk: function(result, customData){},
549-
554+
550555
// Analyze links
551556
link: function(result, customData){
552557
if (!result.broken) { return; }
553558
if (excludeBad && excludeBad.test(result.url.resolved)) { return; }
554-
559+
555560
var currentPage = result.base.resolved
556561
if (previousPage !== currentPage) {
557562
previousPage = currentPage;
@@ -563,10 +568,10 @@ function linkChecker(options) {
563568
//gutil.log(msg);
564569
//gutil.log(result);
565570
},
566-
571+
567572
page: function(error, pageUrl, customData){},
568573
site: function(error, siteUrl, customData){},
569-
574+
570575
end: function(){
571576
var stopTime = new Date().getTime();
572577
var elapsed = 'Elapsed link-checking time: ' + ((stopTime - startTime)/1000) + ' seconds';
@@ -576,24 +581,24 @@ function linkChecker(options) {
576581
deferred.resolve(true);
577582
}
578583
};
579-
584+
580585
// create an output file with header.
581586
var outputFile = path.join(process.cwd(), 'link-checker-results.txt');
582587
var header = 'Link checker results for: ' + siteUrl +
583-
'\nStarted: ' + (new Date()).toLocaleString() +
588+
'\nStarted: ' + (new Date()).toLocaleString() +
584589
'\nSkipping bad links matching regex: ' +excludeBad.toString() + '\n\n';
585590
gutil.log(header);
586591
fs.writeFileSync(outputFile, header);
587-
592+
588593
var siteChecker = new blc.SiteChecker(blcOptions, handlers);
589594
var startTime = new Date().getTime();
590-
591-
try {
595+
596+
try {
592597
siteChecker.enqueue(siteUrl, customData);
593598
} catch (err) {
594599
deferred.reject(err);
595-
}
596-
return deferred.promise;
600+
}
601+
return deferred.promise;
597602
}
598603

599604
// harp has issues with node_modules under the public dir
@@ -701,7 +706,7 @@ function watchAndSync(options, cb) {
701706
env({
702707
vars: { NODE_ENV: "production" }
703708
});
704-
709+
705710
execCommands(['npm run harp -- server .'], {}, cb);
706711

707712
var browserSync = require('browser-sync').create();
@@ -781,7 +786,7 @@ function apiExamplesWatch(postShredAction) {
781786

782787
function devGuideExamplesWatch(shredOptions, postShredAction) {
783788
var includePattern = path.join(shredOptions.examplesDir, '**/*.*');
784-
// removed this version because gulp.watch has the same glob issue that dgeni has.
789+
// removed this version because gulp.watch has the same glob issue that dgeni has.
785790
// var excludePattern = '!' + path.join(shredOptions.examplesDir, '**/node_modules/**/*.*');
786791
// gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) {
787792
var files = globby.sync( [includePattern], { ignore: [ '**/node_modules/**', '**/_fragments/**']});
@@ -989,7 +994,7 @@ function execCommands(cmds, options, cb) {
989994
if (!cmds || cmds.length == 0) cb(null, null, null);
990995
var exec = require('child_process').exec; // just to make it more portable.
991996
gutil.log("NODE_ENV: " + process.env.NODE_ENV);
992-
997+
993998
exec(cmds[0], options, function(err, stdout, stderr) {
994999
if (err == null) {
9951000
if (options.shouldLog) {
@@ -1019,4 +1024,3 @@ function checkAngularProjectPath() {
10191024
throw new Error('API related tasks require the angular2 repo to be at ' + path.resolve(ANGULAR_PROJECT_PATH));
10201025
}
10211026
}
1022-

harp.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
"juleskremer": {
4848
"name": "Jules Kremer",
4949
"picture": "/resources/images/bios/juleskremer.jpg",
50+
"twitter": "jules_kremer",
51+
"website": "https://plus.google.com/+JulesKremer",
5052
"bio": "Jules is a TPM on the Angular team. When not working with developers, Jules is often bending into pretzel-like shapes, climbing mountains or drinking really awesome beer.",
5153
"type": "Lead"
5254
},
@@ -397,6 +399,14 @@
397399
"website": "http://teropa.info/",
398400
"bio": "Tero is an independent software developer and writer. He's been building web applications for his whole professional career, and has almost figured out how to do vertical centering in CSS.",
399401
"type": "Community"
402+
},
403+
"deborah": {
404+
"name": "Deborah Kurata",
405+
"picture": "/resources/images/bios/deborah.jpg",
406+
"twitter": "deborahkurata",
407+
"website": "http://blogs.msmvps.com/deborahk/",
408+
"bio": "Deborah is an independent software developer and author. She is author of several Pluralsight courses including: 'Angular 2: Getting Started'",
409+
"type": "Community"
400410
}
401411
}
402412
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"gulp-task-listing": "^1.0.1",
4545
"gulp-util": "^3.0.6",
4646
"gulp-watch": "^4.3.4",
47-
"harp": "^0.20.1",
47+
"harp": "^0.20.3",
4848
"html2jade": "^0.8.4",
4949
"indent-string": "^2.1.0",
5050
"jasmine-core": "^2.3.4",
@@ -71,5 +71,6 @@
7171
},
7272
"dependencies": {
7373
"jstransformer-marked": "^1.0.1"
74-
}
74+
},
75+
"homepage": "http://angular.io/"
7576
}

public/_includes/_footer.jade

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ else
1919
ul.text-body
2020
li <a href="/"> Angular 2.0</a>
2121
li <a href="https://angularjs.org/"> Angular 1 for JS</a>
22-
li <a href="https://angulardart.org/"> Angular 1 for Dart</a>
2322
li <a href="https://material.angularjs.org"> Angular Material</a>
2423
li <a href="https://www.firebase.com/docs/web/libraries/angular/"> AngularFire</a>
2524

@@ -54,4 +53,4 @@ else
5453
footer(class="background-steel")
5554
small.text-caption Powered by Google ©2010-2016. Code licensed under an <a href="/license" class="text-snow">MIT-style License</a>. Documentation licensed under <a class="text-snow" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
5655
a(aria-label="View Style Guide" href=styleguide title="Style Guide" class="styleguide-trigger text-snow" md-button)
57-
span.icon-favorite
56+
span.icon-favorite

public/docs/_examples/.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
13+
[*.md]
14+
max_line_length = 0
15+
trim_trailing_whitespace = false
16+
17+
# Indentation override
18+
#[lib/**.js]
19+
#[{package.json,.travis.yml}]
20+
#[**/**.js]

public/docs/_examples/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.editorconfig
12
styles.css
23
typings
34
typings.json
@@ -6,5 +7,6 @@ package.json
67
karma.conf.js
78
karma-test-shim.js
89
tsconfig.json
10+
tslint.json
911
npm-debug*.
1012
**/protractor.config.js

public/docs/_examples/architecture/dart/lib/backend_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// #docregion
2-
import 'package:angular2/angular2.dart';
2+
import 'package:angular2/core.dart';
33

44
import 'hero.dart';
55
import 'logger_service.dart';

public/docs/_examples/architecture/dart/lib/hero_detail_component.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// #docregion
2-
import 'package:angular2/angular2.dart';
2+
import 'package:angular2/core.dart';
33

44
import 'hero.dart';
55

public/docs/_examples/architecture/dart/lib/hero_list_component.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// #docplaster
2-
import 'package:angular2/angular2.dart';
2+
import 'package:angular2/core.dart';
33

44
import 'hero.dart';
55
import 'hero_detail_component.dart';

public/docs/_examples/architecture/dart/lib/hero_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:angular2/angular2.dart';
1+
import 'package:angular2/core.dart';
22

33
import 'backend_service.dart';
44
import 'hero.dart';

public/docs/_examples/architecture/dart/lib/logger_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// #docregion
22
import 'dart:html';
33

4-
import 'package:angular2/angular2.dart';
4+
import 'package:angular2/core.dart';
55

66
/// A service for logging messages of various types.
77
///

0 commit comments

Comments
 (0)