diff --git a/.gitignore b/.gitignore index f94e8f4f3b..c327f2acf5 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,6 @@ eplnkr.html public/docs/*/latest/guide/cheatsheet.json protractor-results.txt link-checker-results.txt -*a2docs.css /dist /public/docs/dart /public/docs/ts/_cache diff --git a/gulpfile.js b/gulpfile.js index de899478ef..04b4bcbe3d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -84,26 +84,23 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){ }); var _exampleBoilerplateFiles = [ - 'a2docs.css', + 'src/styles.css', + 'src/systemjs.config.js', + 'src/tsconfig.json', + 'bs-config.json', + 'bs-config.e2e.json', 'package.json', - 'styles.css', - 'systemjs.config.js', - 'tsconfig.json', 'tslint.json' ]; -var _exampleDartWebBoilerPlateFiles = ['a2docs.css', 'styles.css']; - var _exampleUnitTestingBoilerplateFiles = [ - 'browser-test-shim.js', + 'src/browser-test-shim.js', 'karma-test-shim.js', 'karma.conf.js' ]; var _exampleConfigFilename = 'example-config.json'; -var _styleLessName = 'a2docs.less'; - // Gulp flags: // // --lang=[all | ts | js | dart | 'ts|js' | 'ts|js|dart' | ...] @@ -182,21 +179,12 @@ function runE2e() { // fast; skip all setup promise = Promise.resolve(true); } else { - /* - // Not 'fast'; do full setup - var spawnInfo = spawnExt('npm', ['install'], { cwd: EXAMPLES_PATH}); - promise = spawnInfo.promise.then(function() { - copyExampleBoilerplate(); - spawnInfo = spawnExt('npm', ['run', 'webdriver:update'], {cwd: EXAMPLES_PATH}); - return spawnInfo.promise; - }); - */ // Not 'fast'; do full setup gutil.log('runE2e: install _examples stuff'); var spawnInfo = spawnExt('npm', ['install'], { cwd: EXAMPLES_PATH}); promise = spawnInfo.promise + .then(copyExampleBoilerplate) .then(function() { - buildStyles(copyExampleBoilerplate, _.noop); gutil.log('runE2e: update webdriver'); spawnInfo = spawnExt('npm', ['run', 'webdriver:update'], {cwd: EXAMPLES_PATH}); return spawnInfo.promise; @@ -283,8 +271,8 @@ function runE2eTsTests(appDir, outputFile) { } var config = { - build: exampleConfig.build || 'tsc', - run: exampleConfig.run || 'http-server:e2e' + build: exampleConfig.build || 'build', + run: exampleConfig.run || 'serve:e2e' }; var appBuildSpawnInfo = spawnExt('npm', ['run', config.build], { cwd: appDir }); @@ -350,7 +338,7 @@ function runProtractorAoT(appDir, outputFile) { promise = promise.then(() => spawnExt('node', [copyFileCmd], { cwd: appDir }).promise ); } - var aotRunSpawnInfo = spawnExt('npm', ['run', 'http-server:e2e', 'aot', '--', '-s'], { cwd: appDir }); + var aotRunSpawnInfo = spawnExt('npm', ['run', 'serve:aot'], { cwd: appDir }); return runProtractor(promise, appDir, aotRunSpawnInfo, outputFile); } @@ -364,7 +352,7 @@ function runE2eDartTests(appDir, outputFile) { gutil.log('AppDir for Dart e2e: ' + appDir); gutil.log('Deploying from: ' + deployDir); - var appRunSpawnInfo = spawnExt('npm', ['run', 'http-server:e2e', '--', deployDir, '-s'], { cwd: httpLaunchDir }); + var appRunSpawnInfo = spawnExt('npm', ['run', 'serve:e2e', '--', deployDir, '-s'], { cwd: httpLaunchDir }); if (!appRunSpawnInfo.proc.pid) { gutil.log('http-server failed to launch over ' + deployDir); return false; @@ -448,7 +436,7 @@ gulp.task('help', taskListing.withFilters(function(taskName) { })); // requires admin access because it adds symlinks -gulp.task('add-example-boilerplate', function(done) { +gulp.task('add-example-boilerplate', function() { var realPath = path.join(EXAMPLES_PATH, '/node_modules'); var nodeModulesPaths = excludeDartPaths(getNodeModulesPaths(EXAMPLES_PATH)); @@ -457,55 +445,31 @@ gulp.task('add-example-boilerplate', function(done) { fsUtils.addSymlink(realPath, linkPath); }); - return buildStyles(copyExampleBoilerplate, done); + return copyExampleBoilerplate(); }); // copies boilerplate files to locations // where an example app is found gulp.task('_copy-example-boilerplate', function (done) { - return argv.fast ? done() : buildStyles(copyExampleBoilerplate, done); + return argv.fast ? done() : copyExampleBoilerplate(); }); -//Builds Angular Docs CSS file from Bootstrap npm LESS source -//and copies the result to the _examples folder to be included as -//part of the example boilerplate. -function buildStyles(cb, done){ - gulp.src(path.join(STYLES_SOURCE_PATH, _styleLessName)) - .pipe(less()) - .pipe(gulp.dest(BOILERPLATE_PATH)).on('end', function(){ - cb().then(function() { done(); }); - }); -} - // copies boilerplate files to locations // where an example app is found // also copies certain web files (e.g., styles.css) to ~/_examples/**/dart/**/web function copyExampleBoilerplate() { gutil.log('Copying example boilerplate files'); - var sourceFiles = _exampleBoilerplateFiles.map(function(fn) { - return path.join(BOILERPLATE_PATH, fn); - }); var examplePaths = excludeDartPaths(getExamplePaths(EXAMPLES_PATH)); - var dartWebSourceFiles = _exampleDartWebBoilerPlateFiles.map(function(fn){ - return path.join(BOILERPLATE_PATH, fn); - }); - var dartExampleWebPaths = getDartExampleWebPaths(EXAMPLES_PATH); - // Make boilerplate files read-only to avoid that they be edited by mistake. var destFileMode = '444'; - return copyFiles(sourceFiles, examplePaths, destFileMode) - .then(function() { - return copyFiles(dartWebSourceFiles, dartExampleWebPaths, destFileMode); - }) + return copyFiles(_exampleBoilerplateFiles, BOILERPLATE_PATH, examplePaths, destFileMode) // copy the unit test boilerplate .then(function() { - var unittestSourceFiles = - _exampleUnitTestingBoilerplateFiles - .map(function(name) { return path.join(EXAMPLES_TESTING_PATH, name); }); var unittestPaths = getUnitTestingPaths(EXAMPLES_PATH); - return copyFiles(unittestSourceFiles, unittestPaths, destFileMode); + return copyFiles(_exampleUnitTestingBoilerplateFiles, + EXAMPLES_TESTING_PATH, unittestPaths, destFileMode); }) .catch(function(err) { gutil.log(err); @@ -582,9 +546,6 @@ function deleteExampleBoilerPlate() { var unittestPaths = getUnitTestingPaths(EXAMPLES_PATH); return deleteFiles(_exampleBoilerplateFiles, examplePaths) - .then(function() { - return deleteFiles(_exampleDartWebBoilerPlateFiles, dartExampleWebPaths); - }) .then(function() { return deleteFiles(_exampleUnitTestingBoilerplateFiles, unittestPaths); }); @@ -1053,15 +1014,15 @@ function harpJsonSetJade2NgTo(v) { // Copies fileNames into destPaths, setting the mode of the // files at the destination as optional_destFileMode if given. // returns a promise -function copyFiles(fileNames, destPaths, optional_destFileMode) { +function copyFiles(fileNames, originPath, destPaths, optional_destFileMode) { var copy = Q.denodeify(fsExtra.copy); var chmod = Q.denodeify(fsExtra.chmod); var copyPromises = []; destPaths.forEach(function(destPath) { fileNames.forEach(function(fileName) { - var baseName = path.basename(fileName); - var destName = path.join(destPath, baseName); - var p = copy(fileName, destName, { clobber: true}); + var originName = path.join(originPath, fileName); + var destName = path.join(destPath, fileName); + var p = copy(originName, destName, { clobber: true}); if(optional_destFileMode !== undefined) { p = p.then(function () { return chmod(destName, optional_destFileMode); diff --git a/public/_includes/_util-fns.jade b/public/_includes/_util-fns.jade index 0b1e00160d..7a755027c8 100644 --- a/public/_includes/_util-fns.jade +++ b/public/_includes/_util-fns.jade @@ -46,8 +46,8 @@ //- NgModule related - var _AppModuleVsAppComp = 'AppModule' -- var _appModuleTsVsAppCompTs = 'app/app.module.ts' -- var _appModuleTsVsMainTs = 'app/app.module.ts' +- var _appModuleTsVsAppCompTs = 'src/app/app.module.ts' +- var _appModuleTsVsMainTs = 'src/app/app.module.ts' - var _bootstrapModule = 'bootstrapModule' - var _declsVsDirectives = 'declarations' - var _moduleVsComp = 'module' diff --git a/public/docs/_examples/.gitignore b/public/docs/_examples/.gitignore index c1d5403c98..d3e14b4f54 100644 --- a/public/docs/_examples/.gitignore +++ b/public/docs/_examples/.gitignore @@ -1,22 +1,18 @@ -# _exampleBoilerplateFiles -.editorconfig -karma.conf.js -karma-test-shim.js -package.json -*/**/styles.css -systemjs.config.js -*/**/tsconfig.json -tslint.json -wallaby.js +# _boilerplate files +!_boilerplate/* +*/*/src/styles.css +*/*/src/systemjs.config.js +*/*/src/tsconfig.json +*/*/bs-config.e2e.json +*/*/bs-config.json +*/*/package.json +*/*/tslint.json +# example files _test-output +protractor-helpers.js +*/e2e-spec.js **/ts/**/*.js **/js-es6*/**/*.js **/ts-snippets/**/*.js -*.d.ts - -!**/*e2e-spec.js -!systemjs.config.1.js !**/systemjs.config.extras.js -!_boilerplate/* -_boilerplate/a2docs.css diff --git a/public/docs/_examples/_boilerplate/bs-config.e2e.json b/public/docs/_examples/_boilerplate/bs-config.e2e.json new file mode 100644 index 0000000000..24570dbcc9 --- /dev/null +++ b/public/docs/_examples/_boilerplate/bs-config.e2e.json @@ -0,0 +1,14 @@ +{ + "open": false, + "logLevel": "silent", + "port": 8080, + "server": { + "baseDir": "src", + "routes": { + "/node_modules": "node_modules" + }, + "middleware": { + "0": null + } + } +} diff --git a/public/docs/_examples/_boilerplate/bs-config.json b/public/docs/_examples/_boilerplate/bs-config.json new file mode 100644 index 0000000000..4e58595267 --- /dev/null +++ b/public/docs/_examples/_boilerplate/bs-config.json @@ -0,0 +1,8 @@ +{ + "server": { + "baseDir": "src", + "routes": { + "/node_modules": "node_modules" + } + } +} diff --git a/public/docs/_examples/_boilerplate/example-config.json b/public/docs/_examples/_boilerplate/example-config.json index e69de29bb2..ff5403e6ca 100644 --- a/public/docs/_examples/_boilerplate/example-config.json +++ b/public/docs/_examples/_boilerplate/example-config.json @@ -0,0 +1,4 @@ +{ + "build": "build", + "run": "serve" +} diff --git a/public/docs/_examples/_boilerplate/package.json b/public/docs/_examples/_boilerplate/package.json index 1591f89d76..5ac9fa9de2 100644 --- a/public/docs/_examples/_boilerplate/package.json +++ b/public/docs/_examples/_boilerplate/package.json @@ -4,22 +4,32 @@ "private": true, "description": "Example package.json, only contains needed scripts for examples. See _examples/package.json for master package.json.", "scripts": { - "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", - "e2e": "tsc && concurrently \"http-server\" \"protractor protractor.config.js\"", - "http-server": "tsc && http-server", - "http-server:e2e": "http-server", - "http-server:cli": "http-server dist/", - "lite": "lite-server", - "lite:aot": "lite-server -c aot/bs-config.json", - "test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"", - "tsc": "tsc", - "tsc:w": "tsc -w", + "build": "tsc -p src/", + "build:watch": "tsc -p src/ -w", + "build:e2e": "tsc -p e2e/", + "serve": "lite-server -c=bs-config.json", + "serve:e2e": "lite-server -c=bs-config.e2e.json", + "prestart": "npm run build", + "start": "concurrently \"npm run build:watch\" \"npm run serve\"", + "pree2e": "webdriver-manager update && npm run build:e2e", + "e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first", + "protractor": "protractor protractor.config.js", + "pretest": "npm run build", + "test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"", + "pretest:once": "npm run build", + "test:once": "karma start karma.conf.js --single-run", + "lint": "tslint ./src/**/*.ts -t verbose", + + "build:upgrade": "tsc", + "serve:upgrade": "http-server", + "build:cli": "ng build --no-progress", + "serve:cli": "http-server dist/", + "build:aot": "ngc -p tsconfig-aot.json && rollup -c rollup-config.js", + "serve:aot": "lite-server -c bs-config.aot.json", "start:webpack": "webpack-dev-server --inline --progress --port 8080", "test:webpack": "karma start karma.webpack.conf.js", "build:webpack": "rimraf dist && webpack --config config/webpack.prod.js --bail", - "build:cli": "ng build --no-progress", - "build:aot": "ngc -p tsconfig-aot.json && rollup -c rollup-config.js", - "build:babel": "babel app -d app --extensions \".es6\" --source-maps", + "build:babel": "babel src -d src --extensions \".es6\" --source-maps", "copy-dist-files": "node ./copy-dist-files.js", "i18n": "ng-xi18n" }, diff --git a/public/docs/_examples/_boilerplate/plnkr.json b/public/docs/_examples/_boilerplate/plnkr.json new file mode 100644 index 0000000000..5fb55b50ad --- /dev/null +++ b/public/docs/_examples/_boilerplate/plnkr.json @@ -0,0 +1,10 @@ +{ + "description": "QuickStart", + "basePath": "src/", + "files": [ + "app/app.component.ts", + "index.html" + ], + "open": "app/app.component.ts", + "tags": ["quickstart"] +} diff --git a/public/docs/_examples/_boilerplate/styles.css b/public/docs/_examples/_boilerplate/src/styles.css similarity index 100% rename from public/docs/_examples/_boilerplate/styles.css rename to public/docs/_examples/_boilerplate/src/styles.css diff --git a/public/docs/_examples/_boilerplate/systemjs.config.js b/public/docs/_examples/_boilerplate/src/systemjs.config.js similarity index 100% rename from public/docs/_examples/_boilerplate/systemjs.config.js rename to public/docs/_examples/_boilerplate/src/systemjs.config.js diff --git a/public/docs/_examples/_boilerplate/systemjs.config.web.build.js b/public/docs/_examples/_boilerplate/src/systemjs.config.web.build.js similarity index 100% rename from public/docs/_examples/_boilerplate/systemjs.config.web.build.js rename to public/docs/_examples/_boilerplate/src/systemjs.config.web.build.js diff --git a/public/docs/_examples/_boilerplate/systemjs.config.web.js b/public/docs/_examples/_boilerplate/src/systemjs.config.web.js similarity index 100% rename from public/docs/_examples/_boilerplate/systemjs.config.web.js rename to public/docs/_examples/_boilerplate/src/systemjs.config.web.js diff --git a/public/docs/_examples/_boilerplate/src/tsconfig.json b/public/docs/_examples/_boilerplate/src/tsconfig.json new file mode 100644 index 0000000000..05839ec2ff --- /dev/null +++ b/public/docs/_examples/_boilerplate/src/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "lib": [ "es2015", "dom" ], + "noImplicitAny": true, + "suppressImplicitAnyIndexErrors": true, + "typeRoots": [ + "../../../node_modules/@types/" + ] + }, + "compileOnSave": true, + "exclude": [ + "node_modules/*", + "**/*-aot.ts" + ] +} diff --git a/public/docs/_examples/animations/ts/plnkr.json b/public/docs/_examples/animations/ts/plnkr.json index 4fface319e..f047395e7f 100644 --- a/public/docs/_examples/animations/ts/plnkr.json +++ b/public/docs/_examples/animations/ts/plnkr.json @@ -1,5 +1,6 @@ { "description": "Angular Animations", + "basePath": "src/", "files":[ "!**/*.d.ts", "!**/*.js" diff --git a/public/docs/_examples/animations/ts/app/app.module.ts b/public/docs/_examples/animations/ts/src/app/app.module.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/app.module.ts rename to public/docs/_examples/animations/ts/src/app/app.module.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-auto.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-auto.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-auto.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-auto.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-basic.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-basic.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-basic.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-basic.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-combined-transitions.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-combined-transitions.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-combined-transitions.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-combined-transitions.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-enter-leave-states.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-enter-leave-states.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-enter-leave-states.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-enter-leave-states.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-enter-leave.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-enter-leave.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-enter-leave.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-enter-leave.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-groups.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-groups.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-groups.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-groups.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-inline-styles.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-inline-styles.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-inline-styles.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-inline-styles.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-multistep.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-multistep.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-multistep.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-multistep.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-timings.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-timings.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-timings.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-timings.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list-twoway.component.ts b/public/docs/_examples/animations/ts/src/app/hero-list-twoway.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list-twoway.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-list-twoway.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero-list.component.css b/public/docs/_examples/animations/ts/src/app/hero-list.component.css similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-list.component.css rename to public/docs/_examples/animations/ts/src/app/hero-list.component.css diff --git a/public/docs/_examples/animations/ts/app/hero-team-builder.component.ts b/public/docs/_examples/animations/ts/src/app/hero-team-builder.component.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero-team-builder.component.ts rename to public/docs/_examples/animations/ts/src/app/hero-team-builder.component.ts diff --git a/public/docs/_examples/animations/ts/app/hero.service.ts b/public/docs/_examples/animations/ts/src/app/hero.service.ts similarity index 100% rename from public/docs/_examples/animations/ts/app/hero.service.ts rename to public/docs/_examples/animations/ts/src/app/hero.service.ts diff --git a/public/docs/_examples/animations/ts/index.html b/public/docs/_examples/animations/ts/src/index.html similarity index 92% rename from public/docs/_examples/animations/ts/index.html rename to public/docs/_examples/animations/ts/src/index.html index 1569b37645..6c4a13adb2 100644 --- a/public/docs/_examples/animations/ts/index.html +++ b/public/docs/_examples/animations/ts/src/index.html @@ -18,7 +18,7 @@ diff --git a/public/docs/_examples/animations/ts/app/main.ts b/public/docs/_examples/animations/ts/src/main.ts similarity index 73% rename from public/docs/_examples/animations/ts/app/main.ts rename to public/docs/_examples/animations/ts/src/main.ts index 2470c9595e..f22933ba8e 100644 --- a/public/docs/_examples/animations/ts/app/main.ts +++ b/public/docs/_examples/animations/ts/src/main.ts @@ -1,4 +1,4 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app.module'; +import { AppModule } from './app/app.module'; platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/public/docs/_examples/architecture/ts/plnkr.json b/public/docs/_examples/architecture/ts/plnkr.json index 9a4180a9d4..b2f47131df 100644 --- a/public/docs/_examples/architecture/ts/plnkr.json +++ b/public/docs/_examples/architecture/ts/plnkr.json @@ -1,5 +1,6 @@ { "description": "Intro to Angular", + "basePath": "src/", "files":[ "!**/*.d.ts", "!**/*.js", diff --git a/public/docs/_examples/architecture/ts/app/app.component.ts b/public/docs/_examples/architecture/ts/src/app/app.component.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/app.component.ts rename to public/docs/_examples/architecture/ts/src/app/app.component.ts diff --git a/public/docs/_examples/architecture/ts/app/app.module.ts b/public/docs/_examples/architecture/ts/src/app/app.module.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/app.module.ts rename to public/docs/_examples/architecture/ts/src/app/app.module.ts diff --git a/public/docs/_examples/architecture/ts/app/backend.service.ts b/public/docs/_examples/architecture/ts/src/app/backend.service.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/backend.service.ts rename to public/docs/_examples/architecture/ts/src/app/backend.service.ts diff --git a/public/docs/_examples/architecture/ts/app/hero-detail.component.html b/public/docs/_examples/architecture/ts/src/app/hero-detail.component.html similarity index 100% rename from public/docs/_examples/architecture/ts/app/hero-detail.component.html rename to public/docs/_examples/architecture/ts/src/app/hero-detail.component.html diff --git a/public/docs/_examples/architecture/ts/app/hero-detail.component.ts b/public/docs/_examples/architecture/ts/src/app/hero-detail.component.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/hero-detail.component.ts rename to public/docs/_examples/architecture/ts/src/app/hero-detail.component.ts diff --git a/public/docs/_examples/architecture/ts/app/hero-list.component.1.html b/public/docs/_examples/architecture/ts/src/app/hero-list.component.1.html similarity index 100% rename from public/docs/_examples/architecture/ts/app/hero-list.component.1.html rename to public/docs/_examples/architecture/ts/src/app/hero-list.component.1.html diff --git a/public/docs/_examples/architecture/ts/app/hero-list.component.html b/public/docs/_examples/architecture/ts/src/app/hero-list.component.html similarity index 100% rename from public/docs/_examples/architecture/ts/app/hero-list.component.html rename to public/docs/_examples/architecture/ts/src/app/hero-list.component.html diff --git a/public/docs/_examples/architecture/ts/app/hero-list.component.ts b/public/docs/_examples/architecture/ts/src/app/hero-list.component.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/hero-list.component.ts rename to public/docs/_examples/architecture/ts/src/app/hero-list.component.ts diff --git a/public/docs/_examples/architecture/ts/app/hero.service.ts b/public/docs/_examples/architecture/ts/src/app/hero.service.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/hero.service.ts rename to public/docs/_examples/architecture/ts/src/app/hero.service.ts diff --git a/public/docs/_examples/architecture/ts/app/hero.ts b/public/docs/_examples/architecture/ts/src/app/hero.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/hero.ts rename to public/docs/_examples/architecture/ts/src/app/hero.ts diff --git a/public/docs/_examples/architecture/ts/app/logger.service.ts b/public/docs/_examples/architecture/ts/src/app/logger.service.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/logger.service.ts rename to public/docs/_examples/architecture/ts/src/app/logger.service.ts diff --git a/public/docs/_examples/architecture/ts/app/mini-app.ts b/public/docs/_examples/architecture/ts/src/app/mini-app.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/mini-app.ts rename to public/docs/_examples/architecture/ts/src/app/mini-app.ts diff --git a/public/docs/_examples/architecture/ts/app/sales-tax.component.ts b/public/docs/_examples/architecture/ts/src/app/sales-tax.component.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/sales-tax.component.ts rename to public/docs/_examples/architecture/ts/src/app/sales-tax.component.ts diff --git a/public/docs/_examples/architecture/ts/app/sales-tax.service.ts b/public/docs/_examples/architecture/ts/src/app/sales-tax.service.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/sales-tax.service.ts rename to public/docs/_examples/architecture/ts/src/app/sales-tax.service.ts diff --git a/public/docs/_examples/architecture/ts/app/tax-rate.service.ts b/public/docs/_examples/architecture/ts/src/app/tax-rate.service.ts similarity index 100% rename from public/docs/_examples/architecture/ts/app/tax-rate.service.ts rename to public/docs/_examples/architecture/ts/src/app/tax-rate.service.ts diff --git a/public/docs/_examples/architecture/ts/index.html b/public/docs/_examples/architecture/ts/src/index.html similarity index 88% rename from public/docs/_examples/architecture/ts/index.html rename to public/docs/_examples/architecture/ts/src/index.html index 5e9bab78c7..9aadf6e109 100644 --- a/public/docs/_examples/architecture/ts/index.html +++ b/public/docs/_examples/architecture/ts/src/index.html @@ -15,7 +15,7 @@ diff --git a/public/docs/_examples/cb-dependency-injection/ts/app/main.ts b/public/docs/_examples/architecture/ts/src/main.ts similarity index 75% rename from public/docs/_examples/cb-dependency-injection/ts/app/main.ts rename to public/docs/_examples/architecture/ts/src/main.ts index 4acf5de663..6b6532d428 100644 --- a/public/docs/_examples/cb-dependency-injection/ts/app/main.ts +++ b/public/docs/_examples/architecture/ts/src/main.ts @@ -1,5 +1,5 @@ // #docregion import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app.module'; +import { AppModule } from './app/app.module'; platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/public/docs/_examples/attribute-directives/ts/plnkr.json b/public/docs/_examples/attribute-directives/ts/plnkr.json index a64cbd2e95..112e1de6f4 100644 --- a/public/docs/_examples/attribute-directives/ts/plnkr.json +++ b/public/docs/_examples/attribute-directives/ts/plnkr.json @@ -1,5 +1,6 @@ { "description": "Attribute Directive", + "basePath": "src/", "files":[ "!**/*.d.ts", "!**/*.js", diff --git a/public/docs/_examples/attribute-directives/ts/app/app.component.1.html b/public/docs/_examples/attribute-directives/ts/src/app/app.component.1.html similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/app.component.1.html rename to public/docs/_examples/attribute-directives/ts/src/app/app.component.1.html diff --git a/public/docs/_examples/attribute-directives/ts/app/app.component.1.ts b/public/docs/_examples/attribute-directives/ts/src/app/app.component.1.ts similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/app.component.1.ts rename to public/docs/_examples/attribute-directives/ts/src/app/app.component.1.ts diff --git a/public/docs/_examples/attribute-directives/ts/app/app.component.html b/public/docs/_examples/attribute-directives/ts/src/app/app.component.html similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/app.component.html rename to public/docs/_examples/attribute-directives/ts/src/app/app.component.html diff --git a/public/docs/_examples/attribute-directives/ts/app/app.component.ts b/public/docs/_examples/attribute-directives/ts/src/app/app.component.ts similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/app.component.ts rename to public/docs/_examples/attribute-directives/ts/src/app/app.component.ts diff --git a/public/docs/_examples/attribute-directives/ts/app/app.module.ts b/public/docs/_examples/attribute-directives/ts/src/app/app.module.ts similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/app.module.ts rename to public/docs/_examples/attribute-directives/ts/src/app/app.module.ts diff --git a/public/docs/_examples/attribute-directives/ts/app/dummy.module.1.ts b/public/docs/_examples/attribute-directives/ts/src/app/dummy.module.1.ts similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/dummy.module.1.ts rename to public/docs/_examples/attribute-directives/ts/src/app/dummy.module.1.ts diff --git a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.1.ts b/public/docs/_examples/attribute-directives/ts/src/app/highlight.directive.1.ts similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/highlight.directive.1.ts rename to public/docs/_examples/attribute-directives/ts/src/app/highlight.directive.1.ts diff --git a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.2.ts b/public/docs/_examples/attribute-directives/ts/src/app/highlight.directive.2.ts similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/highlight.directive.2.ts rename to public/docs/_examples/attribute-directives/ts/src/app/highlight.directive.2.ts diff --git a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.3.ts b/public/docs/_examples/attribute-directives/ts/src/app/highlight.directive.3.ts similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/highlight.directive.3.ts rename to public/docs/_examples/attribute-directives/ts/src/app/highlight.directive.3.ts diff --git a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.ts b/public/docs/_examples/attribute-directives/ts/src/app/highlight.directive.ts similarity index 100% rename from public/docs/_examples/attribute-directives/ts/app/highlight.directive.ts rename to public/docs/_examples/attribute-directives/ts/src/app/highlight.directive.ts diff --git a/public/docs/_examples/attribute-directives/ts/index.html b/public/docs/_examples/attribute-directives/ts/src/index.html similarity index 89% rename from public/docs/_examples/attribute-directives/ts/index.html rename to public/docs/_examples/attribute-directives/ts/src/index.html index 5276824680..97662437f0 100644 --- a/public/docs/_examples/attribute-directives/ts/index.html +++ b/public/docs/_examples/attribute-directives/ts/src/index.html @@ -16,7 +16,7 @@
diff --git a/public/docs/_examples/attribute-directives/ts/app/main.ts b/public/docs/_examples/attribute-directives/ts/src/main.ts similarity index 75% rename from public/docs/_examples/attribute-directives/ts/app/main.ts rename to public/docs/_examples/attribute-directives/ts/src/main.ts index 4acf5de663..6b6532d428 100644 --- a/public/docs/_examples/attribute-directives/ts/app/main.ts +++ b/public/docs/_examples/attribute-directives/ts/src/main.ts @@ -1,5 +1,5 @@ // #docregion import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app.module'; +import { AppModule } from './app/app.module'; platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/plnkr.json b/public/docs/_examples/cb-ajs-quick-reference/ts/plnkr.json index 6b91b367d2..1ff34275f7 100644 --- a/public/docs/_examples/cb-ajs-quick-reference/ts/plnkr.json +++ b/public/docs/_examples/cb-ajs-quick-reference/ts/plnkr.json @@ -1,5 +1,6 @@ { "description": "AngularJS to Angular Quick Reference", + "basePath": "src/", "files":[ "!**/*.d.ts", "!**/*.js", diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/app-routing.module.ts b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app-routing.module.ts similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/app-routing.module.ts rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app-routing.module.ts diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/app.component.css b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.component.css similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/app.component.css rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.component.css diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/app.component.html b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.component.html similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/app.component.html rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.component.html diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/app.component.ts b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.component.ts similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/app.component.ts rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.component.ts diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/app.module.1.ts b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.module.1.ts similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/app.module.1.ts rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.module.1.ts diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/app.module.ts b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.module.ts similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/app.module.ts rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/app.module.ts diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/date.pipe.ts b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/date.pipe.ts similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/date.pipe.ts rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/date.pipe.ts diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/movie-list.component.css b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie-list.component.css similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/movie-list.component.css rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie-list.component.css diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/movie-list.component.html b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie-list.component.html similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/movie-list.component.html rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie-list.component.html diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/movie-list.component.ts b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie-list.component.ts similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/movie-list.component.ts rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie-list.component.ts diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/movie.service.ts b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie.service.ts similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/movie.service.ts rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie.service.ts diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/app/movie.ts b/public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie.ts similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/app/movie.ts rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/app/movie.ts diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/images/hero.png b/public/docs/_examples/cb-ajs-quick-reference/ts/src/images/hero.png similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/images/hero.png rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/images/hero.png diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/images/ng-logo.png b/public/docs/_examples/cb-ajs-quick-reference/ts/src/images/ng-logo.png similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/images/ng-logo.png rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/images/ng-logo.png diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/images/villain.png b/public/docs/_examples/cb-ajs-quick-reference/ts/src/images/villain.png similarity index 100% rename from public/docs/_examples/cb-ajs-quick-reference/ts/images/villain.png rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/images/villain.png diff --git a/public/docs/_examples/cb-ajs-quick-reference/ts/index.html b/public/docs/_examples/cb-ajs-quick-reference/ts/src/index.html similarity index 90% rename from public/docs/_examples/cb-ajs-quick-reference/ts/index.html rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/index.html index 8d65d69361..829f080ae3 100644 --- a/public/docs/_examples/cb-ajs-quick-reference/ts/index.html +++ b/public/docs/_examples/cb-ajs-quick-reference/ts/src/index.html @@ -17,7 +17,7 @@ diff --git a/public/docs/_examples/architecture/ts/app/main.ts b/public/docs/_examples/cb-ajs-quick-reference/ts/src/main.ts similarity index 75% rename from public/docs/_examples/architecture/ts/app/main.ts rename to public/docs/_examples/cb-ajs-quick-reference/ts/src/main.ts index 4acf5de663..6b6532d428 100644 --- a/public/docs/_examples/architecture/ts/app/main.ts +++ b/public/docs/_examples/cb-ajs-quick-reference/ts/src/main.ts @@ -1,5 +1,5 @@ // #docregion import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app.module'; +import { AppModule } from './app/app.module'; platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/public/docs/_examples/cb-aot-compiler/ts/example-config.json b/public/docs/_examples/cb-aot-compiler/ts/example-config.json index 1ef73390ce..473b80a572 100644 --- a/public/docs/_examples/cb-aot-compiler/ts/example-config.json +++ b/public/docs/_examples/cb-aot-compiler/ts/example-config.json @@ -1,4 +1,3 @@ { - "build": "build:aot", - "run": "http-server:e2e" -} \ No newline at end of file + "build": "build:aot" +} diff --git a/public/docs/_examples/cb-aot-compiler/ts/rollup-config.js b/public/docs/_examples/cb-aot-compiler/ts/rollup-config.js index bfb02c2c41..0c9088fe54 100644 --- a/public/docs/_examples/cb-aot-compiler/ts/rollup-config.js +++ b/public/docs/_examples/cb-aot-compiler/ts/rollup-config.js @@ -6,8 +6,8 @@ import uglify from 'rollup-plugin-uglify' // #docregion config export default { - entry: 'app/main.js', - dest: 'dist/build.js', // output a single application bundle + entry: 'src/main.js', + dest: 'src/build.js', // output a single application bundle sourceMap: false, format: 'iife', onwarn: function(warning) { diff --git a/public/docs/_examples/cb-aot-compiler/ts/app/app.component.html b/public/docs/_examples/cb-aot-compiler/ts/src/app/app.component.html similarity index 100% rename from public/docs/_examples/cb-aot-compiler/ts/app/app.component.html rename to public/docs/_examples/cb-aot-compiler/ts/src/app/app.component.html diff --git a/public/docs/_examples/cb-aot-compiler/ts/app/app.component.ts b/public/docs/_examples/cb-aot-compiler/ts/src/app/app.component.ts similarity index 100% rename from public/docs/_examples/cb-aot-compiler/ts/app/app.component.ts rename to public/docs/_examples/cb-aot-compiler/ts/src/app/app.component.ts diff --git a/public/docs/_examples/cb-aot-compiler/ts/app/app.module.ts b/public/docs/_examples/cb-aot-compiler/ts/src/app/app.module.ts similarity index 100% rename from public/docs/_examples/cb-aot-compiler/ts/app/app.module.ts rename to public/docs/_examples/cb-aot-compiler/ts/src/app/app.module.ts diff --git a/public/docs/_examples/cb-aot-compiler/ts/index-jit.html b/public/docs/_examples/cb-aot-compiler/ts/src/index-jit.html similarity index 89% rename from public/docs/_examples/cb-aot-compiler/ts/index-jit.html rename to public/docs/_examples/cb-aot-compiler/ts/src/index-jit.html index d11f1d972e..713a04970e 100644 --- a/public/docs/_examples/cb-aot-compiler/ts/index-jit.html +++ b/public/docs/_examples/cb-aot-compiler/ts/src/index-jit.html @@ -14,7 +14,7 @@ diff --git a/public/docs/_examples/cb-aot-compiler/ts/index.html b/public/docs/_examples/cb-aot-compiler/ts/src/index.html similarity index 94% rename from public/docs/_examples/cb-aot-compiler/ts/index.html rename to public/docs/_examples/cb-aot-compiler/ts/src/index.html index e1f6e27f30..9016f3cbe1 100644 --- a/public/docs/_examples/cb-aot-compiler/ts/index.html +++ b/public/docs/_examples/cb-aot-compiler/ts/src/index.html @@ -18,6 +18,6 @@