Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Update Dart QS to resemble TS one, use _examples #270

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ node_modules
bower_components
jspm_packages
typings
packages
build
pubspec.lock
.pub
.packages
*.map
.DS_Store
.idea
Expand Down
4 changes: 2 additions & 2 deletions public/doc-shredder/doc-shredder.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function createShredPackage(shredOptions) {
readFilesProcessor.sourceFiles = [ {
// Process all candidate files in `src` and its subfolders ...
include: includeFiles,
exclude: ['**/node_modules/**', '**/typings/**'],
exclude: ['**/node_modules/**', '**/typings/**', '**/packages/**', '**/build/**'],
// When calculating the relative path to these files use this as the base path.
// So `src/foo/bar.js` will have relative path of `foo/bar.js`
basePath: options.examplesDir
Expand Down Expand Up @@ -231,4 +231,4 @@ function initializePackage(pkg) {
// Set logging level
log.level = 'info';
})
}
}
9 changes: 9 additions & 0 deletions public/docs/_examples/gettingstarted/dart/ex1/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# #docregion
name: angular2-getting-started
version: 0.0.1
dependencies:
angular2: 2.0.0-alpha.42
browser: ^0.10.0
transformers:
- angular2:
entry_points: web/main.dart
15 changes: 15 additions & 0 deletions public/docs/_examples/gettingstarted/dart/ex1/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- #docregion -->
<!DOCTYPE html>
<html>
<head>
<title>Getting Started</title>

<!-- #docregion loaddart -->
<script async src="main.dart" type="application/dart"></script>
<script async src="packages/browser/dart.js"></script>
<!-- #enddocregion loaddart -->
</head>
<body>
<my-app>Loading...</my-app>
</body>
</html>
10 changes: 10 additions & 0 deletions public/docs/_examples/gettingstarted/dart/ex1/web/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// #docregion
import 'package:angular2/angular2.dart';
import 'package:angular2/bootstrap.dart';

@Component(selector: 'my-app', template: '<h1>My First Angular 2 App</h1>')
class AppComponent {}

main() {
bootstrap(AppComponent);
}
11 changes: 11 additions & 0 deletions public/docs/_examples/gettingstarted/dart/ex2/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# #docregion
name: angular2-getting-started
version: 0.0.1
dependencies:
angular2: 2.0.0-alpha.42
browser: ^0.10.0
dart_to_js_script_rewriter: ^0.1.0
transformers:
- angular2:
entry_points: web/main.dart
- dart_to_js_script_rewriter
15 changes: 15 additions & 0 deletions public/docs/_examples/gettingstarted/dart/ex2/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- #docregion -->
<!DOCTYPE html>
<html>
<head>
<title>Getting Started</title>

<!-- #docregion loaddart -->
<script async src="main.dart" type="application/dart"></script>
<script async src="packages/browser/dart.js"></script>
<!-- #enddocregion loaddart -->
</head>
<body>
<my-app>Loading...</my-app>
</body>
</html>
10 changes: 10 additions & 0 deletions public/docs/_examples/gettingstarted/dart/ex2/web/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// #docregion
import 'package:angular2/angular2.dart';
import 'package:angular2/bootstrap.dart';

@Component(selector: 'my-app', template: '<h1>My First Angular 2 App</h1>')
class AppComponent {}

main() {
bootstrap(AppComponent);
}
Loading