Skip to content

Commit 12f638c

Browse files
authored
Reorganized package, put example it it's own directory, etc (#9)
* Reorganized package, put example it it's own directory, etc * Add missing copyright headers * Pipe through documentation on serve [director:port] * Print helpful error with bad command usage * Enable travis * Be very careful when invoking the build script via isolate Closes #10 * latest angular
1 parent bf1e804 commit 12f638c

26 files changed

+282
-91
lines changed

.gitignore

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
packages
2-
/*/build/
3-
.pub/
4-
pubspec.lock
5-
6-
# Files generated by dart tools
71
.dart_tool
8-
doc/
2+
.packages
3+
pubspec.lock

.travis.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Created with https://github.com/dart-lang/mono_repo
2+
language: dart
3+
4+
jobs:
5+
include:
6+
- stage: analyzer_and_format
7+
script: ./tool/travis.sh dartfmt
8+
env: PKG="example"
9+
dart: dev
10+
- stage: analyzer_and_format
11+
script: ./tool/travis.sh dartanalyzer
12+
env: PKG="example"
13+
dart: dev
14+
- stage: analyzer_and_format
15+
script: ./tool/travis.sh dartfmt
16+
env: PKG="webdev"
17+
dart: dev
18+
- stage: analyzer_and_format
19+
script: ./tool/travis.sh dartanalyzer
20+
env: PKG="webdev"
21+
dart: dev
22+
23+
stages:
24+
- analyzer_and_format
25+
26+
# Only building master means that we don't run two builds for each pull request.
27+
branches:
28+
only: [master]
29+
30+
cache:
31+
directories:
32+
- $HOME/.pub-cache

example/.mono_repo.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See https://github.com/dart-lang/mono_repo for details
2+
dart:
3+
- dev
4+
5+
stages:
6+
- analyzer_and_format:
7+
- dartfmt
8+
- dartanalyzer: --fatal-infos --fatal-warnings .
9+
# - unit_test:
10+
# - test
File renamed without changes.

webdev/example/lib/app_component.dart renamed to example/lib/app_component.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
15
import 'package:angular/angular.dart';
26

37
import 'src/hello_world/hello_world.dart';
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
import 'package:angular/angular.dart';
6+
7+
@Component(
8+
selector: 'hello-world',
9+
styleUrls: const ['hello_world.css'],
10+
templateUrl: 'hello_world.html',
11+
)
12+
class HelloWorldComponent {
13+
// Nothing here.
14+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div>Hello World</div>

example/pubspec.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: webdev_example_app
2+
description: A web app example for webdev CLI.
3+
4+
environment:
5+
sdk: ">=2.0.0-dev.32.0 <2.0.0"
6+
7+
dependencies:
8+
angular: ^5.0.0-alpha+8
9+
10+
dev_dependencies:
11+
build_runner: ^0.8.0
12+
build_web_compilers: ^0.3.4

0 commit comments

Comments
 (0)