From 3d992384c3fd80ec2778183a6c77313da977b554 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Thu, 11 Feb 2016 15:08:06 -0800 Subject: [PATCH] chore(devguide/ts): to beta.6 + typings + related doc updates --- gulpfile.js | 23 ++- public/docs/_examples/.gitignore | 1 + .../homepage-hello-world/ts/index.1.html | 6 +- .../_examples/homepage-tabs/ts/index.1.html | 6 +- .../_examples/homepage-todo/ts/index.1.html | 6 +- public/docs/_examples/package.json | 25 +-- .../_examples/quickstart/js/package.1.json | 4 +- .../docs/_examples/quickstart/ts/app/main.ts | 1 - .../_examples/quickstart/ts/package.1.json | 13 +- .../_examples/quickstart/ts/tsconfig.1.json | 4 +- .../_examples/quickstart/ts/typings.1.json | 5 + public/docs/_examples/tsconfig.json | 4 +- public/docs/_examples/typings.json | 6 + public/docs/js/latest/guide/forms.jade | 6 +- public/docs/ts/latest/guide/forms.jade | 7 +- public/docs/ts/latest/guide/router.jade | 29 ++-- .../ts/latest/guide/server-communication.jade | 2 +- public/docs/ts/latest/quickstart.jade | 163 ++++++++++++++---- .../ts/latest/testing/first-app-tests.jade | 14 +- public/docs/ts/latest/tutorial/toh-pt1.jade | 4 +- public/docs/ts/latest/tutorial/toh-pt2.jade | 4 +- public/docs/ts/latest/tutorial/toh-pt3.jade | 10 +- public/docs/ts/latest/tutorial/toh-pt4.jade | 10 +- public/docs/ts/latest/tutorial/toh-pt5.jade | 9 +- tools/plunker-builder/indexHtmlTranslator.js | 18 +- tools/plunker-builder/plunkerBuilder.js | 1 + 26 files changed, 275 insertions(+), 106 deletions(-) create mode 100644 public/docs/_examples/quickstart/ts/typings.1.json create mode 100644 public/docs/_examples/typings.json diff --git a/gulpfile.js b/gulpfile.js index 5f2f94aa3a..cf1967eb06 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -66,7 +66,7 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){ return new Minimatch(excludePattern) }); -var _exampleBoilerplateFiles = ['package.json', 'tsconfig.json', 'karma.conf.js', 'karma-test-shim.js' ]; +var _exampleBoilerplateFiles = ['package.json', 'tsconfig.json', 'typings.json', 'karma.conf.js', 'karma-test-shim.js' ]; // --filter may be passed in to filter/select _example app subdir names // i.e. gulp run-e2e-tests --filter=foo ; would select all example apps with @@ -232,6 +232,14 @@ gulp.task('add-example-boilerplate', function() { gutil.log("symlinking " + linkPath + ' -> ' + realPath) fsUtils.addSymlink(realPath, linkPath); }); + + realPath = path.join(EXAMPLES_PATH, '/typings'); + var typingsPaths = getTypingsPaths(EXAMPLES_PATH); + typingsPaths.forEach(function(linkPath) { + gutil.log("symlinking " + linkPath + ' -> ' + realPath) + fsUtils.addSymlink(realPath, linkPath); + }); + copyExampleBoilerplate(); }); @@ -257,6 +265,12 @@ gulp.task('remove-example-boilerplate', function() { nodeModulesPaths.forEach(function(linkPath) { fsUtils.removeSymlink(linkPath); }); + + var typingsPaths = getTypingsPaths(EXAMPLES_PATH); + typingsPaths.forEach(function(linkPath) { + fsUtils.removeSymlink(linkPath); + }); + var examplePaths = getExamplePaths(EXAMPLES_PATH); return deleteFiles(_exampleBoilerplateFiles, examplePaths).then(function() { var e2eSpecPaths = getE2eSpecPaths(EXAMPLES_PATH); @@ -507,6 +521,13 @@ function getNodeModulesPaths(basePath) { return paths; } +function getTypingsPaths(basePath) { + var paths = getExamplePaths(basePath).map(function(examplePath) { + return path.join(examplePath, "/typings"); + }); + return paths; +} + function getExamplePaths(basePath, includeBase) { // includeBase defaults to false return getPaths(basePath, "example-config.json", includeBase) diff --git a/public/docs/_examples/.gitignore b/public/docs/_examples/.gitignore index 816d48cb07..d9583fccca 100644 --- a/public/docs/_examples/.gitignore +++ b/public/docs/_examples/.gitignore @@ -1,4 +1,5 @@ typings +typings.json *.js.map package.json karma.conf.js diff --git a/public/docs/_examples/homepage-hello-world/ts/index.1.html b/public/docs/_examples/homepage-hello-world/ts/index.1.html index f62ef90bba..b149e15cc9 100644 --- a/public/docs/_examples/homepage-hello-world/ts/index.1.html +++ b/public/docs/_examples/homepage-hello-world/ts/index.1.html @@ -12,9 +12,9 @@ - - - + + + - - - + + + - - - + + +