This repository was archived by the owner on Dec 4, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 875
docs(toh-6-aot): add aot to toh-6 #2496
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
**/*.metadata.json | ||
dist | ||
!app/tsconfig.json | ||
!rollup.js | ||
!rollup-config.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,4 @@ export class AppComponent { | |
toggleHeading() { | ||
this.showHeading = !this.showHeading; | ||
} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
**/*.js | ||
aot/**/*.ts | ||
!rollup-config.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"port": 8000, | ||
"files": ["./aot/**/*.{html,htm,css,js}"], | ||
"server": { "baseDir": "./aot" } | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- #docregion --> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<base href="/"> | ||
<title>Angular Tour of Heroes</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<script src="shim.min.js"></script> | ||
<script src="zone.min.js"></script> | ||
<!-- #docregion moduleId --> | ||
<script>window.module = 'aot';</script> | ||
<!-- #enddocregion moduleId --> | ||
</head> | ||
|
||
<body> | ||
<my-app>Loading...</my-app> | ||
</body> | ||
<script src="dist/build.js"></script> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// #docregion | ||
import { platformBrowser } from '@angular/platform-browser'; | ||
|
||
import { AppModuleNgFactory } from '../aot/app/app.module.ngfactory'; | ||
|
||
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// #docregion | ||
var fs = require('fs'); | ||
var resources = [ | ||
'node_modules/core-js/client/shim.min.js', | ||
'node_modules/zone.js/dist/zone.min.js' | ||
]; | ||
resources.map(function(f) { | ||
var path = f.split('/'); | ||
var t = 'aot/' + path[path.length-1]; | ||
fs.createReadStream(f).pipe(fs.createWriteStream(t)); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<!-- #docregion --> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// #docregion | ||
import rollup from 'rollup' | ||
import nodeResolve from 'rollup-plugin-node-resolve' | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import uglify from 'rollup-plugin-uglify' | ||
|
||
//paths are relative to the execution path | ||
export default { | ||
entry: 'app/main-aot.js', | ||
dest: 'aot/dist/build.js', // output a single application bundle | ||
sourceMap: true, | ||
sourceMapFile: 'aot/dist/build.js.map', | ||
format: 'iife', | ||
plugins: [ | ||
nodeResolve({jsnext: true, module: true}), | ||
commonjs({ | ||
include: [ | ||
'node_modules/rxjs/**', | ||
'node_modules/angular-in-memory-web-api/**' | ||
], | ||
}), | ||
uglify() | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "es2015", | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"removeComments": false, | ||
"noImplicitAny": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"types": [] | ||
}, | ||
|
||
"files": [ | ||
"app/app.module.ts", | ||
"app/main-aot.ts", | ||
"typings/index.d.ts" | ||
], | ||
|
||
"angularCompilerOptions": { | ||
"genDir": "aot", | ||
"skipMetadataEmit" : true | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,4 @@ | |
"include": [ | ||
"*/e2e-spec.ts" | ||
] | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this in the examples? its cool but are we using it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the prose talks about how to use it, so I think it makes sense to install it with the sample