This repository has been archived by the owner on May 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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 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,28 @@ | ||
// Copyright (c) 2015, Google Inc. Please see the AUTHORS file for details. | ||
// All rights reserved. Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
library stagehand.web.angular; | ||
|
||
import '../stagehand.dart'; | ||
import '../src/common.dart'; | ||
import 'web_angular_data.dart'; | ||
|
||
/** | ||
* A generator for an Angular 2 application. | ||
*/ | ||
class WebAngularGenerator extends DefaultGenerator { | ||
WebAngularGenerator() | ||
: super('web-angular', 'Angular 2 Web Application', | ||
'A web app built using Angular 2.', | ||
categories: const ['dart', 'web']) { | ||
for (TemplateFile file in decodeConcatenatedData(data)) { | ||
addTemplateFile(file); | ||
} | ||
|
||
setEntrypoint(getFile('web/index.html')); | ||
} | ||
|
||
String getInstallInstructions() => "${super.getInstallInstructions()}\n" | ||
"to run your app, use 'pub serve'"; | ||
} |
This file contains 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,46 @@ | ||
// Copyright (c) 2014, Google Inc. Please see the AUTHORS file for details. | ||
// All rights reserved. Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
const List<String> data = const [ | ||
".gitignore", | ||
"text", | ||
"""IyBGaWxlcyBhbmQgZGlyZWN0b3JpZXMgY3JlYXRlZCBieSBwdWIKLmJ1aWxkbG9nCi5wYWNrYWdl | ||
cwoucHJvamVjdAoucHViLwpidWlsZC8KcGFja2FnZXMKcHVic3BlYy5sb2NrICMgKFJlbW92ZSB0 | ||
aGlzIHBhdHRlcm4gaWYgeW91IHdpc2ggdG8gY2hlY2sgaW4geW91ciBsb2NrIGZpbGUpCgojIEZp | ||
bGVzIGNyZWF0ZWQgYnkgZGFydDJqcwoqLmRhcnQuanMKKi5wYXJ0LmpzCiouanMuZGVwcwoqLmpz | ||
Lm1hcAoqLmluZm8uanNvbgoKIyBEaXJlY3RvcnkgY3JlYXRlZCBieSBkYXJ0ZG9jCmRvYy9hcGkv | ||
CgojIEpldEJyYWlucyBJREVzIChXZWJTdG9ybSBhbmQgSURFQSBhcmUgdGhlIHJlY29tZW5kZWQg | ||
RGFydCBJREVzKSAKLmlkZWEvCiouaW1sCiouaXByCiouaXdzCg==""", | ||
"lib/app_component.dart", | ||
"text", | ||
"""Ly8gQ29weXJpZ2h0IChjKSBfX3llYXJfXywgX19hdXRob3JfXy4gQWxsIHJpZ2h0cyByZXNlcnZl | ||
ZC4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUKLy8gaXMgZ292ZXJuZWQgYnkgYSBCU0Qtc3R5bGUg | ||
bGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLgoKbGlicmFyeSBf | ||
X3Byb2plY3ROYW1lX18uYXBwX2NvbXBvbmVudDsKCmltcG9ydCAncGFja2FnZTphbmd1bGFyMi9h | ||
bmd1bGFyMi5kYXJ0JzsKCkBDb21wb25lbnQoc2VsZWN0b3I6ICdteS1hcHAnLCB0ZW1wbGF0ZVVy | ||
bDogJ2FwcF9jb21wb25lbnQuaHRtbCcpCmNsYXNzIEFwcENvbXBvbmVudCB7fQo=""", | ||
"lib/app_component.html", | ||
"text", | ||
"PGgxPk15IEZpcnN0IEFuZ3VsYXIgMiBBcHA8L2gxPgo=", | ||
"pubspec.yaml", | ||
"text", | ||
"""bmFtZTogX19wcm9qZWN0TmFtZV9fCnZlcnNpb246IDAuMC4xCmRlcGVuZGVuY2llczoKICBhbmd1 | ||
bGFyMjogMi4wLjAtYWxwaGEuNDcKICBicm93c2VyOiBeMC4xMC4wCnRyYW5zZm9ybWVyczoKLSBh | ||
bmd1bGFyMjoKICAgIGVudHJ5X3BvaW50czogd2ViL21haW4uZGFydAo=""", | ||
"web/index.html", | ||
"text", | ||
"""PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPHRpdGxlPl9fcHJvamVjdE5hbWVf | ||
XzwvdGl0bGU+CgogICAgPHNjcmlwdCBkZWZlciBzcmM9Im1haW4uZGFydCIgdHlwZT0iYXBwbGlj | ||
YXRpb24vZGFydCI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IGRlZmVyIHNyYz0icGFja2FnZXMvYnJv | ||
d3Nlci9kYXJ0LmpzIj48L3NjcmlwdD4KICA8L2hlYWQ+CiAgPGJvZHk+CiAgICA8bXktYXBwPkxv | ||
YWRpbmcuLi48L215LWFwcD4KICA8L2JvZHk+CjwvaHRtbD4K""", | ||
"web/main.dart", | ||
"text", | ||
"""Ly8gQ29weXJpZ2h0IChjKSBfX3llYXJfXywgX19hdXRob3JfXy4gQWxsIHJpZ2h0cyByZXNlcnZl | ||
ZC4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUKLy8gaXMgZ292ZXJuZWQgYnkgYSBCU0Qtc3R5bGUg | ||
bGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLgoKbGlicmFyeSBf | ||
X3Byb2plY3ROYW1lX18ud2ViOwoKaW1wb3J0ICdwYWNrYWdlOmFuZ3VsYXIyL2Jvb3RzdHJhcC5k | ||
YXJ0JzsKCmltcG9ydCAncGFja2FnZTpfX3Byb2plY3ROYW1lX18vYXBwX2NvbXBvbmVudC5kYXJ0 | ||
JzsKCm1haW4oKSB7CiAgYm9vdHN0cmFwKEFwcENvbXBvbmVudCk7Cn0K""" | ||
]; |
This file contains 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 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 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 @@ | ||
# Files and directories created by pub | ||
.buildlog | ||
.packages | ||
.project | ||
.pub/ | ||
build/ | ||
packages | ||
pubspec.lock # (Remove this pattern if you wish to check in your lock file) | ||
|
||
# Files created by dart2js | ||
*.dart.js | ||
*.part.js | ||
*.js.deps | ||
*.js.map | ||
*.info.json | ||
|
||
# Directory created by dartdoc | ||
doc/api/ | ||
|
||
# JetBrains IDEs (WebStorm and IDEA are the recomended Dart IDEs) | ||
.idea/ | ||
*.iml | ||
*.ipr | ||
*.iws |
This file contains 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,9 @@ | ||
// Copyright (c) __year__, __author__. All rights reserved. Use of this source code | ||
// is governed by a BSD-style license that can be found in the LICENSE file. | ||
|
||
library __projectName__.app_component; | ||
|
||
import 'package:angular2/angular2.dart'; | ||
|
||
@Component(selector: 'my-app', templateUrl: 'app_component.html') | ||
class AppComponent {} |
This file contains 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 @@ | ||
<h1>My First Angular 2 App</h1> |
This file contains 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,8 @@ | ||
name: __projectName__ | ||
version: 0.0.1 | ||
dependencies: | ||
angular2: 2.0.0-alpha.47 | ||
browser: ^0.10.0 | ||
transformers: | ||
- angular2: | ||
entry_points: web/main.dart |
This file contains 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,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>__projectName__</title> | ||
|
||
<script defer src="main.dart" type="application/dart"></script> | ||
<script defer src="packages/browser/dart.js"></script> | ||
</head> | ||
<body> | ||
<my-app>Loading...</my-app> | ||
</body> | ||
</html> |
This file contains 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,12 @@ | ||
// Copyright (c) __year__, __author__. All rights reserved. Use of this source code | ||
// is governed by a BSD-style license that can be found in the LICENSE file. | ||
|
||
library __projectName__.web; | ||
|
||
import 'package:angular2/bootstrap.dart'; | ||
|
||
import 'package:__projectName__/app_component.dart'; | ||
|
||
main() { | ||
bootstrap(AppComponent); | ||
} |