refactor(build): simplify and modularize
simplify: - use same html file for dart and JS - build benchmarks automatically when doing `gulp build` - centralize configuration modularize: - move all build tasks into separate node.js modules under `tools/build`. changes: - the `build` folder is now the `dist` folder Closes #284
This commit is contained in:
@ -1,23 +1,11 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<title>Hello Angular 2.0 (JS)</title>
|
||||
<title>Hello Angular 2.0 (Reflection)</title>
|
||||
<body>
|
||||
<hello-app>
|
||||
Loading...
|
||||
</hello-app>
|
||||
|
||||
<script src="../../../traceur-runtime.js"></script>
|
||||
<script src="../../../rtts_assert/lib/rtts_assert.js"></script>
|
||||
<script src="../../../es6-module-loader-sans-promises.src.js"></script>
|
||||
<script src="../../../system.src.js"></script>
|
||||
<script src="../../../extension-register.js"></script>
|
||||
|
||||
<script src="main.js"></script>
|
||||
$SCRIPTS$
|
||||
</body>
|
||||
</html>
|
||||
<!-- to run do:
|
||||
1) gulp build
|
||||
2) gulp serve
|
||||
3) open localhost:8000/js/examples/lib/hello_world/ in chrome.
|
||||
TODO(rado): merge with Darts's index.html in ../../web/
|
||||
-->
|
||||
|
11
modules/examples/src/hello_world/index_static.html
Normal file
11
modules/examples/src/hello_world/index_static.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<title>Hello Angular 2.0 (Static)</title>
|
||||
<body>
|
||||
<hello-app>
|
||||
Loading...
|
||||
</hello-app>
|
||||
|
||||
$SCRIPTS$
|
||||
</body>
|
||||
</html>
|
@ -1,4 +1,4 @@
|
||||
import * as app from './app';
|
||||
import * as app from './index';
|
||||
|
||||
import {Component, Decorator, TemplateConfig, NgElement} from 'core/core';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
@ -1,23 +0,0 @@
|
||||
register(System);
|
||||
|
||||
System.baseURL = '../../../';
|
||||
|
||||
// So that we can import packages like `core/foo`, instead of `core/lib/foo`.
|
||||
System.paths = {
|
||||
'core/*': './core/lib/*.js',
|
||||
'change_detection/*': './change_detection/lib/*.js',
|
||||
'facade/*': './facade/lib/*.js',
|
||||
'di/*': './di/lib/*.js',
|
||||
'reflection/*': './reflection/lib/*.js',
|
||||
'rtts_assert/*': './rtts_assert/lib/*.js',
|
||||
'examples/*': './examples/lib/*.js'
|
||||
};
|
||||
|
||||
|
||||
|
||||
// TODO(rado): templatize and make reusable for all examples
|
||||
System.import('examples/hello_world/app').then(function(m) {
|
||||
m.main();
|
||||
}, function(e) {
|
||||
console.error(e.stack || e);
|
||||
});
|
Reference in New Issue
Block a user