Skip to content

Instantly share code, notes, and snippets.

@okunokentaro
Last active November 22, 2015 08:16
Show Gist options
  • Save okunokentaro/915d88f94ab093742346 to your computer and use it in GitHub Desktop.
Save okunokentaro/915d88f94ab093742346 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<base href="/">
<title>ng-kyoto is very cool</title>
</head>
<body>
<my-app></my-app>
<script src="./bundle.js"></script>
</body>
</html>
import "reflect-metadata";
import {bootstrap, CORE_DIRECTIVES, Component} from "angular2/angular2";
@Component({
selector: `my-app`,
template: `
<h1>hello world</h1>
`,
directives: [CORE_DIRECTIVES]
})
export class App {
}
bootstrap(App)
.catch(err => console.error(err));
"scripts": {
"tsc": "tsc -t es5 -m commonjs --experimentalDecorators --emitDecoratorMetadata --moduleResolution node ./index.ts",
"browserify": "browserify ./index.js -o ./bundle.js",
"build": "npm run tsc && npm run browserify",
"test": "echo \"Error: no test specified\" && exit 1"
}
@okunokentaro
Copy link
Author

npm run build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment