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

docs(dart/quickstart): merge 2 examples into 1 #1031

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
12 changes: 0 additions & 12 deletions public/docs/_examples/quickstart/dart/ex1/pubspec.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions public/docs/_examples/quickstart/dart/ex2/web/index.html

This file was deleted.

10 changes: 0 additions & 10 deletions public/docs/_examples/quickstart/dart/ex2/web/main.dart

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# #docplaster
# #docregion
# #docregion no-rewriter
name: angular2_getting_started
description: QuickStart
version: 0.0.1
Expand All @@ -7,8 +9,11 @@ environment:
dependencies:
angular2: 2.0.0-beta.12
browser: ^0.10.0
# #enddocregion no-rewriter
dart_to_js_script_rewriter: ^1.0.1
# #docregion no-rewriter
transformers:
- angular2:
entry_points: web/main.dart
# #enddocregion no-rewriter
- dart_to_js_script_rewriter
10 changes: 5 additions & 5 deletions public/docs/dart/latest/quickstart.jade
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ p.
Angular 2 is still changing, so provide an exact version:
<b>2.0.0-beta.12</b>.

+makeExample('quickstart/dart/ex1/pubspec.yaml', null, 'pubspec.yaml')
+makeExample('quickstart/dart/pubspec.yaml', 'no-rewriter', 'pubspec.yaml')

p.
In the same directory, create a <code>web</code> directory, and then
Expand Down Expand Up @@ -71,7 +71,7 @@ p.
p.
Paste the following code into <code>web/main.dart</code>:

+makeExample('quickstart/dart/ex1/web/main.dart', null, 'web/main.dart')
+makeExample('quickstart/dart/web/main.dart', null, 'web/main.dart')

:marked
You've just defined an Angular 2 **component**,
Expand Down Expand Up @@ -119,7 +119,7 @@ p.
Create a file named <code>web/index.html</code> that contains
the following code:

+makeExample('quickstart/dart/ex1/web/index.html', null, 'web/index.html')
+makeExample('quickstart/dart/web/index.html', null, 'web/index.html')

:marked
The `<my-app>` tag in the `<body>` is
Expand Down Expand Up @@ -170,7 +170,7 @@ p.
in both the `dependencies` and `transformers` sections.

- var stylePattern = { pnk: /(dart_to_js_script_rewriter.*$)|(- dart_to_js_script_rewriter.*$)/gm, otl: /(dependencies:)|(transformers:)/g };
+makeExample('quickstart/dart/ex2/pubspec.yaml', null, 'pubspec.yaml', stylePattern)
+makeExample('quickstart/dart/pubspec.yaml', null, 'pubspec.yaml', stylePattern)

p.
Then compile your Dart code to JavaScript,
Expand All @@ -194,7 +194,7 @@ p.
configure the Angular transformer:

- var stylePattern = { otl: /(transformers:)|(- angular2:)|(entry_points.*$)/gm };
+makeExample('quickstart/dart/ex2/pubspec.yaml', null, 'pubspec.yaml', stylePattern)
+makeExample('quickstart/dart/pubspec.yaml', null, 'pubspec.yaml', stylePattern)

p.
The <code>entry_points</code> item
Expand Down