Skip to content

Commit 7a8901c

Browse files
committed
Dart generated build.
This build is big. The AngularDart/dart2js sizing problem has not yet been publicly resolved at this point.
1 parent 937f7d8 commit 7a8901c

17 files changed

+252022
-11
lines changed

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Don’t commit the following directories created by pub.
2+
#build/
3+
packages/
4+
5+
# Or the files created by dart2js.
6+
#*.dart.js
7+
#*.dart.precompiled.js
8+
#*.js_
9+
#*.js.deps
10+
#*.js.map
11+
12+
# Include when developing application packages.
13+
pubspec.lock

build/web/src/00/css/main.css

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
body {
2+
margin: 0;
3+
}
4+
5+
.app-background {
6+
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjMzQ5OGRiIj48L3JlY3Q+CjxwYXRoIGQ9Ik0wIDBMOCA4Wk04IDBMMCA4WiIgc3Ryb2tlLXdpZHRoPSIxIiBzdHJva2U9IiM0NWEwZGUiPjwvcGF0aD4KPC9zdmc+");
7+
color: White;
8+
}
9+
10+
.app-emblem {
11+
}

build/web/src/00/index.html

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html ng-app app-ng-ctrl-main>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>W1M0</title>
6+
7+
<meta name="mobile-web-app-capable" content="yes">
8+
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
9+
<meta http-equiv="cleartype" content="on">
10+
11+
<meta name="apple-mobile-web-app-capable" content="yes">
12+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
13+
<meta name="apple-mobile-web-app-title" content="">
14+
15+
<!--
16+
<link rel="stylesheet" href="../../lib/bootstrap-3.1.1/css/bootstrap.min.css"/>
17+
<link rel="stylesheet" href="../../lib/flat-ui/css/flat-ui.css"/>
18+
<link rel="stylesheet" href="../../lib/brick-1.0.1/brick-1.0.1.byob.min.css"/>
19+
<link rel="stylesheet" href="../../lib/font-awesome-4.0.3/css/font-awesome.min.css"/>
20+
-->
21+
<link rel="stylesheet" href="./css/main.css"/>
22+
23+
</head>
24+
<body>
25+
26+
<ng-view></ng-view>
27+
28+
<!--
29+
<script src="../../lib/jquery/jquery-2.1.0.min.js"></script>
30+
<script src="../../lib/bootstrap-3.1.1/js/bootstrap.min.js"></script>
31+
<script src="../../lib/brick-1.0.1/brick-1.0.1.byob.min.js"></script>
32+
-->
33+
34+
<script src="./js/main.js"></script>
35+
36+
<script type="application/dart" src="main.dart"></script>
37+
<script src="packages/browser/dart.js"></script>
38+
</body>
39+
</html>

build/web/src/00/js/main.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
function svgAnimate(svg, fnDuration) {
2+
3+
function toArray(arr) {
4+
return Array.prototype.slice.call(arr);
5+
}
6+
7+
svg.parentNode.style.visibility = '';
8+
9+
var paths = toArray(svg.querySelectorAll('path'));
10+
11+
var durations = paths.map(fnDuration);
12+
13+
var begin = 0;
14+
paths.forEach(function(path, i) {
15+
var length = path.getTotalLength();
16+
path.style.transition = path.style.WebkitTransition = 'none';
17+
path.style.strokeDasharray = length + ' ' + length;
18+
path.style.strokeDashoffset = length;
19+
path.offsetWidth;
20+
path.getBoundingClientRect();
21+
path.style.transition = path.style.WebkitTransition = 'stroke-dashoffset ' + durations[i] + 's ' + begin + 's ease-in-out';
22+
path.style.strokeDashoffset = '0';
23+
begin += durations[i] + 0.1;
24+
});
25+
}

build/web/src/00/main.dart

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// Temporary, please follow:
2+
// https://github.com/angular/angular.dart/issues/476
3+
// https://code.google.com/p/dart/issues/detail?id=14686
4+
5+
// I really have no idea how to use this, even after reading the various docs online.
6+
/*@MirrorsUsed(
7+
targets: const ['angular_dynamic'],
8+
override: '*')
9+
import 'dart:mirrors';*/
10+
11+
/*
12+
@MirrorsUsed(targets: const[
13+
'angular.core.annotation', // Does not resolve NgOneWayOneTime error.
14+
'angular.core_dynamic', // Resolves DynamicMetadataExtractor error.
15+
],
16+
override: '*')
17+
import 'dart:mirrors';
18+
*/
19+
20+
/*
21+
@MirrorsUsed(targets: const[
22+
'angular.app.dynamic',
23+
'dirty_checking_change_detector_dynamic',
24+
'angular.core.parser_dynamic',
25+
'angular.core_dynamic', // Resolves DynamicMetadataExtractor error.
26+
],
27+
override: '*')
28+
import 'dart:mirrors';
29+
*/
30+
31+
import 'package:angular/angular.dart';
32+
import 'package:angular/angular_dynamic.dart';
33+
34+
import 'package:logging/logging.dart';
35+
36+
import 'dart:html';
37+
import 'dart:js' as js;
38+
import 'dart:math' as Math;
39+
40+
import 'dart:async';
41+
42+
class AppNgModule extends Module {
43+
AppNgModule() {
44+
type(AppNgCtrlMain);
45+
type(AppNgCtrlAnimSvg);
46+
type(RouteInitializerFn, implementedBy: AppNgRouteInitializer);
47+
factory(NgRoutingUsePushState, (_) => new NgRoutingUsePushState.value(false));
48+
}
49+
}
50+
51+
class AppNgRouteInitializer {
52+
53+
AppNgRouteInitializer();
54+
55+
call(Router router, RouteViewFactory views) {
56+
views.configure({
57+
'default': ngRoute(
58+
defaultRoute: true,
59+
enter: (RouteEnterEvent e) => router.go('welcome', {}, startingFrom: router.root, replace: true)
60+
),
61+
'welcome': ngRoute(
62+
path: '/welcome',
63+
view: 'routes/welcome.html'
64+
),
65+
});
66+
}
67+
}
68+
69+
@NgController(selector: '[app-ng-ctrl-main]', publishAs: 'index')
70+
class AppNgCtrlMain {
71+
AppNgCtrlMain();
72+
}
73+
74+
@NgController(selector: '[app-ng-ctrl-anim-svg]', publishAs: 'svg')
75+
class AppNgCtrlAnimSvg {
76+
Element _svg;
77+
AppNgCtrlAnimSvg(Element element) {
78+
this._svg = element;
79+
new Timer.periodic(new Duration(seconds: 10), (Timer t) => animate());
80+
}
81+
82+
animate() {
83+
animateJsSvg(_svg, 0.5, 0.03);
84+
}
85+
86+
onClick() {
87+
animate();
88+
}
89+
90+
animateJsSvg(var svg, ratio1, ratio2) {
91+
Logger.root.log(Level.FINEST, "let's animate");
92+
js.context.callMethod("svgAnimate", [svg, (path, whoknows1, whoknows2) {
93+
var length = path.getTotalLength();
94+
return Math.pow(length, ratio1) * ratio2;
95+
}]);
96+
}
97+
98+
}
99+
100+
void main() {
101+
//Logger.root..level = Level.FINEST..onRecord.listen((LogRecord r) { print(r.message); });
102+
dynamicApplication().addModule(new AppNgModule()).run();
103+
}

build/web/src/00/main.dart.js

+103,271
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/web/src/00/main.dart.js.map

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/web/src/00/main.dart.precompiled.js

+148,333
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/web/src/00/routes/welcome.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="app-background app-emblem">
2+
<svg app-ng-ctrl-anim-svg ng-click="svg.onClick()" viewBox="0 0 634 600" xmlns="http://www.w3.org/2000/svg">
3+
<g transform="translate(-11.44,612.44)scale(0.119,-0.119)" fill="none" stroke="#ffffff" stroke-width="300">
4+
<path transform="scale(10,10)" stroke-width="46" d="M516,69C516,201.548,408.548,309,276,309C143.452,309,36,201.548,36,69C72.4844,47.9355,113.871,36.8459,156,36.8459C288.548,36.8459,396,144.298,396,276.846C396,362.59,350.256,441.82,276,484.692C201.744,441.82,156,362.59,156,276.846C156,144.298,263.452,36.8459,396,36.8459C438.129,36.8459,479.515,47.9355,516,69Z"/>
5+
<path stroke="#000000" d="M5158.64,619.256C5159.55,646.161,5160,673.08,5160,700C5160,2025.48,4085.48,3100,2760,3100C1434.52,3100,360,2025.48,360,700C360,673.08,360.453,646.161,361.358,619.256
6+
M290.753,741.548C671.575,504.25,1111.29,378.461,1560,378.461C2885.48,378.461,3960,1452.98,3960,2778.46C3960,3664.82,3471.48,4479.02,2689.39,4896.12
7+
M2830.61,4896.12C2048.53,4479.02,1560,3664.82,1560,2778.46C1560,1452.98,2634.52,378.461,3960,378.461C4408.71,378.461,4848.42,504.25,5229.25,741.548"/>
8+
<path stroke-width="80" d="M1789.77,3101.41C1649.97,3044.92,1515.37,2976.34,1387.51,2896.44
9+
M1756.68,2669.12C1624.83,2601.94,1500.05,2521.69,1384.24,2429.56
10+
M4124.79,2418C4141.58,2537.42,4150,2657.87,4150,2778.46C4150,2808.6,4149.47,2838.73,4148.42,2868.85
11+
M3766.97,2662.8C3768.99,2701.32,3770,2739.89,3770,2778.46C3770,2887.8,3761.89,2996.98,3745.72,3105.12
12+
M2365.44,737.513C2484.25,644.686,2610.94,562.411,2744.07,491.627
13+
M2756.35,924.999C2880.46,844.402,3012.35,776.474,3150.03,722.238"/>
14+
</g>
15+
</svg>
16+
</div>

index.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<!DOCTYPE html>
2-
32
<html>
43
<head>
54
<meta charset="utf-8">
6-
<meta http-equiv="refresh" content="0;url=web/index.html" />
7-
<title>Survey</title>
5+
<meta http-equiv="refresh" content="0;url=build/web/src/00/index.html" />
6+
<!-- <meta http-equiv="refresh" content="0;url=web/src/00/index.html" /> -->
87
</head>
98
<body>
109
</body>

pubspec.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: w1m0_github_io
2+
description: My GitHub page.
3+
dependencies:
4+
angular:
5+
git: https://github.com/angular/angular.dart.git
6+
browser: any
7+

web/index.html

-8
This file was deleted.

web/src/00/css/main.css

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
body {
2+
margin: 0;
3+
}
4+
5+
.app-background {
6+
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjMzQ5OGRiIj48L3JlY3Q+CjxwYXRoIGQ9Ik0wIDBMOCA4Wk04IDBMMCA4WiIgc3Ryb2tlLXdpZHRoPSIxIiBzdHJva2U9IiM0NWEwZGUiPjwvcGF0aD4KPC9zdmc+");
7+
color: White;
8+
}
9+
10+
.app-emblem {
11+
}

web/src/00/index.html

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html ng-app app-ng-ctrl-main>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>W1M0</title>
6+
7+
<meta name="mobile-web-app-capable" content="yes">
8+
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
9+
<meta http-equiv="cleartype" content="on">
10+
11+
<meta name="apple-mobile-web-app-capable" content="yes">
12+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
13+
<meta name="apple-mobile-web-app-title" content="">
14+
15+
<!--
16+
<link rel="stylesheet" href="../../lib/bootstrap-3.1.1/css/bootstrap.min.css"/>
17+
<link rel="stylesheet" href="../../lib/flat-ui/css/flat-ui.css"/>
18+
<link rel="stylesheet" href="../../lib/brick-1.0.1/brick-1.0.1.byob.min.css"/>
19+
<link rel="stylesheet" href="../../lib/font-awesome-4.0.3/css/font-awesome.min.css"/>
20+
-->
21+
<link rel="stylesheet" href="./css/main.css"/>
22+
23+
</head>
24+
<body>
25+
26+
<ng-view></ng-view>
27+
28+
<!--
29+
<script src="../../lib/jquery/jquery-2.1.0.min.js"></script>
30+
<script src="../../lib/bootstrap-3.1.1/js/bootstrap.min.js"></script>
31+
<script src="../../lib/brick-1.0.1/brick-1.0.1.byob.min.js"></script>
32+
-->
33+
34+
<script src="./js/main.js"></script>
35+
36+
<script type="application/dart" src="main.dart"></script>
37+
<script src="packages/browser/dart.js"></script>
38+
</body>
39+
</html>

web/src/00/js/main.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
function svgAnimate(svg, fnDuration) {
2+
3+
function toArray(arr) {
4+
return Array.prototype.slice.call(arr);
5+
}
6+
7+
svg.parentNode.style.visibility = '';
8+
9+
var paths = toArray(svg.querySelectorAll('path'));
10+
11+
var durations = paths.map(fnDuration);
12+
13+
var begin = 0;
14+
paths.forEach(function(path, i) {
15+
var length = path.getTotalLength();
16+
path.style.transition = path.style.WebkitTransition = 'none';
17+
path.style.strokeDasharray = length + ' ' + length;
18+
path.style.strokeDashoffset = length;
19+
path.offsetWidth;
20+
path.getBoundingClientRect();
21+
path.style.transition = path.style.WebkitTransition = 'stroke-dashoffset ' + durations[i] + 's ' + begin + 's ease-in-out';
22+
path.style.strokeDashoffset = '0';
23+
begin += durations[i] + 0.1;
24+
});
25+
}

0 commit comments

Comments
 (0)