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/
|
||||
-->
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<title>Hello Angular 2.0 (Static)</title>
|
||||
<body>
|
||||
<hello-app>
|
||||
Loading...
|
||||
</hello-app>
|
||||
|
||||
$SCRIPTS$
|
||||
</body>
|
||||
</html>
|
||||
+1
-1
@@ -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);
|
||||
});
|
||||
@@ -1,20 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Hello Angular 2.0 (Dart)</title>
|
||||
<script type="application/dart" src="main.dart"></script>
|
||||
<script src="packages/browser/dart.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<hello-app>
|
||||
Loading...
|
||||
</hello-app>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- to run do:
|
||||
1) gulp build
|
||||
2) gulp examples/pub.serve
|
||||
3) open localhost:8080 in dartium or chrome.
|
||||
TODO(rado): merge with JS's index.html in ../src/hello_world/
|
||||
-->
|
||||
@@ -1,20 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Hello Angular 2.0 (Dart Static)</title>
|
||||
<script type="application/dart" src="main_static.dart"></script>
|
||||
<script src="packages/browser/dart.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<hello-app>
|
||||
Loading...
|
||||
</hello-app>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- to run do:
|
||||
1) gulp build
|
||||
2) gulp examples/pub.serve
|
||||
3) open localhost:8080/index_static.html in dartium or chrome.
|
||||
TODO(rado): merge with JS's index.html in ../src/hello_world/
|
||||
-->
|
||||
@@ -1,11 +0,0 @@
|
||||
import 'package:examples/hello_world/app.dart' as HelloWorldApp;
|
||||
import 'package:reflection/reflection_capabilities.dart';
|
||||
import 'package:reflection/reflection.dart';
|
||||
|
||||
// TODO(rado): templatize and make reusable for all examples.
|
||||
main() {
|
||||
// enable mirrors and reflection.
|
||||
// see static_app.js for an example of a static app.
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
||||
HelloWorldApp.main();
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
import 'packages/examples/hello_world/static_app.dart' as HelloWorldApp;
|
||||
|
||||
// TODO(rado): templatize and make reusable for all examples.
|
||||
main() => HelloWorldApp.main();
|
||||
Reference in New Issue
Block a user