diff --git a/gulpfile.js b/gulpfile.js index 4766afc558..82162b7610 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -67,7 +67,16 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){ return new Minimatch(excludePattern) }); -var _exampleBoilerplateFiles = ['package.json', 'tsconfig.json', 'typings.json', 'karma.conf.js', 'karma-test-shim.js' ]; +var _exampleBoilerplateFiles = [ + 'karma.conf.js', + 'karma-test-shim.js', + 'package.json', + 'styles.css', + 'tsconfig.json', + 'typings.json' + ]; + +var _exampleDartWebBoilerPlateFiles = ['styles.css']; // --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 @@ -241,24 +250,35 @@ gulp.task('add-example-boilerplate', function() { fsUtils.addSymlink(realPath, linkPath); }); - copyExampleBoilerplate(); + return copyExampleBoilerplate(); }); // copies boilerplate files to locations // where an example app is found +// also copies certain web files (e.g., styles.css) to ~/_examples/**/dart/**/web // also copies protractor.config.js file function copyExampleBoilerplate() { var sourceFiles = _exampleBoilerplateFiles.map(function(fn) { return path.join(EXAMPLES_PATH, fn); }); var examplePaths = getExamplePaths(EXAMPLES_PATH); - // copies protractor.config.js from _examples dir to each subdir that - // contains a e2e-spec file. - return copyFiles(sourceFiles, examplePaths).then(function() { - var sourceFiles = [ path.join(EXAMPLES_PATH, 'protractor.config.js') ]; - var e2eSpecPaths = getE2eSpecPaths(EXAMPLES_PATH); - return copyFiles(sourceFiles, e2eSpecPaths); + + var dartWebSourceFiles = _exampleDartWebBoilerPlateFiles.map(function(fn){ + return path.join(EXAMPLES_PATH, fn); }); + var dartExampleWebPaths = getDartExampleWebPaths(EXAMPLES_PATH); + + return copyFiles(sourceFiles, examplePaths) + .then(function() { + return copyFiles(dartWebSourceFiles, dartExampleWebPaths); + }) + // copy protractor.config.js from _examples dir to each subdir that + // contains a e2e-spec file. + .then(function() { + var sourceFiles = [ path.join(EXAMPLES_PATH, 'protractor.config.js') ]; + var e2eSpecPaths = getE2eSpecPaths(EXAMPLES_PATH); + return copyFiles(sourceFiles, e2eSpecPaths); + }); } gulp.task('remove-example-boilerplate', function() { @@ -273,10 +293,16 @@ gulp.task('remove-example-boilerplate', function() { }); var examplePaths = getExamplePaths(EXAMPLES_PATH); - return deleteFiles(_exampleBoilerplateFiles, examplePaths).then(function() { - var e2eSpecPaths = getE2eSpecPaths(EXAMPLES_PATH); - return deleteFiles(['protractor.config.js'], e2eSpecPaths); - }) + var dartExampleWebPaths = getDartExampleWebPaths(EXAMPLES_PATH); + + return deleteFiles(_exampleBoilerplateFiles, examplePaths) + .then(function() { + return deleteFiles(_exampleDartWebBoilerPlateFiles, dartExampleWebPaths); + }) + .then(function() { + var e2eSpecPaths = getE2eSpecPaths(EXAMPLES_PATH); + return deleteFiles(['protractor.config.js'], e2eSpecPaths); + }) }); gulp.task('serve-and-sync', ['build-docs'], function (cb) { @@ -300,7 +326,9 @@ gulp.task('build-and-serve', ['build-docs'], function (cb) { watchAndSync({localFiles: true}, cb); }); -gulp.task('build-docs', ['build-devguide-docs', 'build-api-docs', 'build-plunkers', '_zip-examples']); +gulp.task('build-docs', ['build-devguide-docs', 'build-api-docs', 'build-plunkers']); +// Stop zipping examples Feb 28, 2016 +//gulp.task('build-docs', ['build-devguide-docs', 'build-api-docs', 'build-plunkers', '_zip-examples']); gulp.task('build-api-docs', ['build-js-api-docs', 'build-ts-api-docs', 'build-dart-cheatsheet']); @@ -317,7 +345,10 @@ gulp.task('build-js-api-docs', ['_shred-api-examples'], function() { }); gulp.task('build-plunkers', function() { - return plunkerBuilder.buildPlunkers(EXAMPLES_PATH, LIVE_EXAMPLES_PATH, { errFn: gutil.log }); + return copyExampleBoilerplate() + .then(function() { + return plunkerBuilder.buildPlunkers(EXAMPLES_PATH, LIVE_EXAMPLES_PATH, { errFn: gutil.log }); + }); }); gulp.task('build-dart-cheatsheet', [], function() { @@ -557,6 +588,11 @@ function getExamplePaths(basePath, includeBase) { return getPaths(basePath, "example-config.json", includeBase) } +function getDartExampleWebPaths(basePath) { + var paths = globby.sync([path.join(basePath,"**/dart/**/web")]) + return paths; +} + function getPaths(basePath, filename, includeBase) { var filenames = getFilenames(basePath, filename, includeBase); var paths = filenames.map(function(fileName) { diff --git a/public/docs/_examples/.gitignore b/public/docs/_examples/.gitignore index d9583fccca..7a15251d4f 100644 --- a/public/docs/_examples/.gitignore +++ b/public/docs/_examples/.gitignore @@ -1,3 +1,4 @@ +styles.css typings typings.json *.js.map diff --git a/public/docs/_examples/architecture/dart/web/index.html b/public/docs/_examples/architecture/dart/web/index.html index c3d91bf64d..17a00ffbed 100644 --- a/public/docs/_examples/architecture/dart/web/index.html +++ b/public/docs/_examples/architecture/dart/web/index.html @@ -2,6 +2,7 @@ Intro to Angular 2 + diff --git a/public/docs/_examples/architecture/ts/index.html b/public/docs/_examples/architecture/ts/index.html index da2aef3fea..388031aa10 100644 --- a/public/docs/_examples/architecture/ts/index.html +++ b/public/docs/_examples/architecture/ts/index.html @@ -3,6 +3,7 @@ Intro to Angular 2 + diff --git a/public/docs/_examples/attribute-directives/dart/web/index.html b/public/docs/_examples/attribute-directives/dart/web/index.html index e18cdf965b..ad852ad9eb 100644 --- a/public/docs/_examples/attribute-directives/dart/web/index.html +++ b/public/docs/_examples/attribute-directives/dart/web/index.html @@ -3,6 +3,7 @@ Attribute Directives + diff --git a/public/docs/_examples/attribute-directives/ts/index.html b/public/docs/_examples/attribute-directives/ts/index.html index 9e071b3943..97a38048b8 100644 --- a/public/docs/_examples/attribute-directives/ts/index.html +++ b/public/docs/_examples/attribute-directives/ts/index.html @@ -4,7 +4,8 @@ Attribute Directives - + + diff --git a/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/app.component.css b/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/app.component.css index 4c72bf954d..e454e9ea87 100644 --- a/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/app.component.css +++ b/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/app.component.css @@ -1,9 +1,3 @@ -/* route-link anchor tags */ -nav a {padding: 5px; text-decoration: none; font-family: Arial, Helvetica, sans-serif; } -nav a:visited, a:link {color: #444;} -nav a:hover {color: white; background-color: #1171a3; } -nav a.router-link-active {color: white; background-color: #52b9e9; } - .active {font-style: italic;} .shazam {font-weight: bold;} diff --git a/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.css b/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.css index 8476635e12..a3d5bf8161 100644 --- a/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.css +++ b/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.css @@ -7,7 +7,7 @@ table { font-family:Arial, Helvetica, sans-serif; color:#666; font-size:14px; - text-shadow: 1px 1px 0px #fff; + text-shadow: 1px 1px 0 #fff; margin:20px; border:#ccc 1px solid; diff --git a/public/docs/_examples/cb-a1-a2-quick-reference/ts/index.html b/public/docs/_examples/cb-a1-a2-quick-reference/ts/index.html index 80678619b3..37dda86237 100644 --- a/public/docs/_examples/cb-a1-a2-quick-reference/ts/index.html +++ b/public/docs/_examples/cb-a1-a2-quick-reference/ts/index.html @@ -4,6 +4,9 @@ Angular 1 to Angular 2 Quick Reference + + + diff --git a/public/docs/_examples/cb-component-communication/ts/index.html b/public/docs/_examples/cb-component-communication/ts/index.html index 7014b8bbfa..8678794506 100644 --- a/public/docs/_examples/cb-component-communication/ts/index.html +++ b/public/docs/_examples/cb-component-communication/ts/index.html @@ -6,6 +6,7 @@ + diff --git a/public/docs/_examples/dependency-injection/dart/web/index.html b/public/docs/_examples/dependency-injection/dart/web/index.html index 66f07c0838..dd40fd6c61 100644 --- a/public/docs/_examples/dependency-injection/dart/web/index.html +++ b/public/docs/_examples/dependency-injection/dart/web/index.html @@ -4,7 +4,7 @@ Dependency Injection - + diff --git a/public/docs/_examples/dependency-injection/ts/index.html b/public/docs/_examples/dependency-injection/ts/index.html index 34702880e4..04cc28901d 100644 --- a/public/docs/_examples/dependency-injection/ts/index.html +++ b/public/docs/_examples/dependency-injection/ts/index.html @@ -4,6 +4,7 @@ Dependency Injection + diff --git a/public/docs/_examples/displaying-data/dart/web/index.html b/public/docs/_examples/displaying-data/dart/web/index.html index 4e74743dae..6585d21511 100644 --- a/public/docs/_examples/displaying-data/dart/web/index.html +++ b/public/docs/_examples/displaying-data/dart/web/index.html @@ -3,6 +3,7 @@ Displaying Data + diff --git a/public/docs/_examples/displaying-data/ts/index.1.html b/public/docs/_examples/displaying-data/ts/index.1.html index 4685bac9c7..93fcaa763d 100644 --- a/public/docs/_examples/displaying-data/ts/index.1.html +++ b/public/docs/_examples/displaying-data/ts/index.1.html @@ -3,6 +3,7 @@ Displaying Data + diff --git a/public/docs/_examples/displaying-data/ts/index.html b/public/docs/_examples/displaying-data/ts/index.html index cf327f543f..5459c0c3fa 100644 --- a/public/docs/_examples/displaying-data/ts/index.html +++ b/public/docs/_examples/displaying-data/ts/index.html @@ -3,6 +3,7 @@ Displaying Data + diff --git a/public/docs/_examples/forms/js/styles.css b/public/docs/_examples/forms/dart/web/forms.css similarity index 100% rename from public/docs/_examples/forms/js/styles.css rename to public/docs/_examples/forms/dart/web/forms.css diff --git a/public/docs/_examples/forms/dart/web/index.html b/public/docs/_examples/forms/dart/web/index.html index 19dfac369a..e99d87d263 100644 --- a/public/docs/_examples/forms/dart/web/index.html +++ b/public/docs/_examples/forms/dart/web/index.html @@ -11,6 +11,7 @@ + diff --git a/public/docs/_examples/forms/dart/web/styles.css b/public/docs/_examples/forms/dart/web/styles.css deleted file mode 100644 index 095bd1d44a..0000000000 --- a/public/docs/_examples/forms/dart/web/styles.css +++ /dev/null @@ -1,7 +0,0 @@ -/* #docregion */ -.ng-valid[required] { - border-left: 5px solid #42A948; /* green */ -} -.ng-invalid, .ng-invalid:focus { - border-left: 5px solid #a94442; /* red */ -} diff --git a/public/docs/_examples/forms/ts/styles.css b/public/docs/_examples/forms/js/forms.css similarity index 100% rename from public/docs/_examples/forms/ts/styles.css rename to public/docs/_examples/forms/js/forms.css diff --git a/public/docs/_examples/forms/js/index.html b/public/docs/_examples/forms/js/index.html index 8d961a660f..1ded44aab9 100644 --- a/public/docs/_examples/forms/js/index.html +++ b/public/docs/_examples/forms/js/index.html @@ -11,6 +11,7 @@ + diff --git a/public/docs/_examples/forms/ts/forms.css b/public/docs/_examples/forms/ts/forms.css new file mode 100644 index 0000000000..d7e11405b1 --- /dev/null +++ b/public/docs/_examples/forms/ts/forms.css @@ -0,0 +1,9 @@ +/* #docregion */ +.ng-valid[required] { + border-left: 5px solid #42A948; /* green */ +} + +.ng-invalid { + border-left: 5px solid #a94442; /* red */ +} +/* #enddocregion */ \ No newline at end of file diff --git a/public/docs/_examples/forms/ts/index.html b/public/docs/_examples/forms/ts/index.html index 8ebca9931f..b5b08869bc 100644 --- a/public/docs/_examples/forms/ts/index.html +++ b/public/docs/_examples/forms/ts/index.html @@ -10,6 +10,7 @@ + diff --git a/public/docs/_examples/hierarchical-dependency-injection/dart/web/index.html b/public/docs/_examples/hierarchical-dependency-injection/dart/web/index.html index cd76cf209b..598203b414 100644 --- a/public/docs/_examples/hierarchical-dependency-injection/dart/web/index.html +++ b/public/docs/_examples/hierarchical-dependency-injection/dart/web/index.html @@ -6,6 +6,7 @@ Hierarchical Injector + diff --git a/public/docs/_examples/hierarchical-dependency-injection/ts/index.html b/public/docs/_examples/hierarchical-dependency-injection/ts/index.html index 19eb817608..e029217cee 100644 --- a/public/docs/_examples/hierarchical-dependency-injection/ts/index.html +++ b/public/docs/_examples/hierarchical-dependency-injection/ts/index.html @@ -3,6 +3,7 @@ Hierarchical Injectors + 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 ecb437edc9..5305f8c937 100644 --- a/public/docs/_examples/homepage-hello-world/ts/index.1.html +++ b/public/docs/_examples/homepage-hello-world/ts/index.1.html @@ -4,6 +4,7 @@ Angular 2 Hello World + diff --git a/public/docs/_examples/homepage-hello-world/ts/index.html b/public/docs/_examples/homepage-hello-world/ts/index.html index 32dc818f61..997edd82d7 100644 --- a/public/docs/_examples/homepage-hello-world/ts/index.html +++ b/public/docs/_examples/homepage-hello-world/ts/index.html @@ -4,6 +4,7 @@ Angular 2 Hello World + diff --git a/public/docs/_examples/homepage-tabs/ts/index.1.html b/public/docs/_examples/homepage-tabs/ts/index.1.html index fddfd65ede..60e8cd9b7c 100644 --- a/public/docs/_examples/homepage-tabs/ts/index.1.html +++ b/public/docs/_examples/homepage-tabs/ts/index.1.html @@ -4,8 +4,8 @@ Angular 2 Tabs - + diff --git a/public/docs/_examples/homepage-tabs/ts/index.html b/public/docs/_examples/homepage-tabs/ts/index.html index c37331d93e..8cc7032da8 100644 --- a/public/docs/_examples/homepage-tabs/ts/index.html +++ b/public/docs/_examples/homepage-tabs/ts/index.html @@ -4,8 +4,8 @@ Angular 2 Tabs - + diff --git a/public/docs/_examples/homepage-todo/ts/index.1.html b/public/docs/_examples/homepage-todo/ts/index.1.html index 0438091b3a..3375008d86 100644 --- a/public/docs/_examples/homepage-todo/ts/index.1.html +++ b/public/docs/_examples/homepage-todo/ts/index.1.html @@ -4,8 +4,8 @@ Angular 2 Todos - + diff --git a/public/docs/_examples/homepage-todo/ts/index.html b/public/docs/_examples/homepage-todo/ts/index.html index ef91ed5f19..c0796e4ff2 100644 --- a/public/docs/_examples/homepage-todo/ts/index.html +++ b/public/docs/_examples/homepage-todo/ts/index.html @@ -4,9 +4,9 @@ Angular 2 Todos - - + + diff --git a/public/docs/_examples/lifecycle-hooks/dart/web/index.html b/public/docs/_examples/lifecycle-hooks/dart/web/index.html index eb830008ad..ae668dd2e9 100644 --- a/public/docs/_examples/lifecycle-hooks/dart/web/index.html +++ b/public/docs/_examples/lifecycle-hooks/dart/web/index.html @@ -4,6 +4,7 @@ Angular 2 Lifecycle Hooks + diff --git a/public/docs/_examples/lifecycle-hooks/ts/index.html b/public/docs/_examples/lifecycle-hooks/ts/index.html index 62bec73470..a55cab995a 100644 --- a/public/docs/_examples/lifecycle-hooks/ts/index.html +++ b/public/docs/_examples/lifecycle-hooks/ts/index.html @@ -4,6 +4,7 @@ Angular 2 Lifecycle Hooks + diff --git a/public/docs/_examples/pipes/dart/web/index.html b/public/docs/_examples/pipes/dart/web/index.html index 190cd7df3e..483b9537ba 100644 --- a/public/docs/_examples/pipes/dart/web/index.html +++ b/public/docs/_examples/pipes/dart/web/index.html @@ -2,6 +2,7 @@ Pipes Example + diff --git a/public/docs/_examples/pipes/ts/index.html b/public/docs/_examples/pipes/ts/index.html index db8bee2dab..f11eba1c67 100644 --- a/public/docs/_examples/pipes/ts/index.html +++ b/public/docs/_examples/pipes/ts/index.html @@ -3,6 +3,7 @@ Pipes + diff --git a/public/docs/_examples/quickstart/dart/ex1/web/index.html b/public/docs/_examples/quickstart/dart/ex1/web/index.html index 8bef2b4d44..a1e925b8fb 100644 --- a/public/docs/_examples/quickstart/dart/ex1/web/index.html +++ b/public/docs/_examples/quickstart/dart/ex1/web/index.html @@ -3,6 +3,7 @@ Getting Started + diff --git a/public/docs/_examples/quickstart/dart/ex2/web/index.html b/public/docs/_examples/quickstart/dart/ex2/web/index.html index 8bef2b4d44..a1e925b8fb 100644 --- a/public/docs/_examples/quickstart/dart/ex2/web/index.html +++ b/public/docs/_examples/quickstart/dart/ex2/web/index.html @@ -3,6 +3,7 @@ Getting Started + diff --git a/public/docs/_examples/quickstart/js/index.html b/public/docs/_examples/quickstart/js/index.html index bb7e38592b..1e66047c46 100644 --- a/public/docs/_examples/quickstart/js/index.html +++ b/public/docs/_examples/quickstart/js/index.html @@ -4,7 +4,8 @@ Angular 2 QuickStart - + + diff --git a/public/docs/_examples/quickstart/ts/index.html b/public/docs/_examples/quickstart/ts/index.html index 28553919c5..40c8b29dd5 100644 --- a/public/docs/_examples/quickstart/ts/index.html +++ b/public/docs/_examples/quickstart/ts/index.html @@ -4,6 +4,7 @@ Angular 2 QuickStart + diff --git a/public/docs/_examples/router/ts/app/crisis-center/crisis-list.component.1.ts b/public/docs/_examples/router/ts/app/crisis-center/crisis-list.component.1.ts index 5338092184..96854b910c 100644 --- a/public/docs/_examples/router/ts/app/crisis-center/crisis-list.component.1.ts +++ b/public/docs/_examples/router/ts/app/crisis-center/crisis-list.component.1.ts @@ -8,7 +8,7 @@ import {Router} from 'angular2/router'; @Component({ // #docregion template template: ` -