-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
26 changed files
with
282 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
packages | ||
/*/build/ | ||
.pub/ | ||
pubspec.lock | ||
|
||
# Files generated by dart tools | ||
.dart_tool | ||
doc/ | ||
.packages | ||
pubspec.lock |
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,32 @@ | ||
# Created with https://github.com/dart-lang/mono_repo | ||
language: dart | ||
|
||
jobs: | ||
include: | ||
- stage: analyzer_and_format | ||
script: ./tool/travis.sh dartfmt | ||
env: PKG="example" | ||
dart: dev | ||
- stage: analyzer_and_format | ||
script: ./tool/travis.sh dartanalyzer | ||
env: PKG="example" | ||
dart: dev | ||
- stage: analyzer_and_format | ||
script: ./tool/travis.sh dartfmt | ||
env: PKG="webdev" | ||
dart: dev | ||
- stage: analyzer_and_format | ||
script: ./tool/travis.sh dartanalyzer | ||
env: PKG="webdev" | ||
dart: dev | ||
|
||
stages: | ||
- analyzer_and_format | ||
|
||
# Only building master means that we don't run two builds for each pull request. | ||
branches: | ||
only: [master] | ||
|
||
cache: | ||
directories: | ||
- $HOME/.pub-cache |
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,10 @@ | ||
# See https://github.com/dart-lang/mono_repo for details | ||
dart: | ||
- dev | ||
|
||
stages: | ||
- analyzer_and_format: | ||
- dartfmt | ||
- dartanalyzer: --fatal-infos --fatal-warnings . | ||
# - unit_test: | ||
# - test |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
webdev/example/lib/app_component.dart → example/lib/app_component.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
File renamed without changes.
File renamed without changes.
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,14 @@ | ||
// Copyright (c) 2018, the Dart project authors. 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. | ||
|
||
import 'package:angular/angular.dart'; | ||
|
||
@Component( | ||
selector: 'hello-world', | ||
styleUrls: const ['hello_world.css'], | ||
templateUrl: 'hello_world.html', | ||
) | ||
class HelloWorldComponent { | ||
// Nothing here. | ||
} |
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 @@ | ||
<div>Hello World</div> |
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 @@ | ||
name: webdev_example_app | ||
description: A web app example for webdev CLI. | ||
|
||
environment: | ||
sdk: ">=2.0.0-dev.32.0 <2.0.0" | ||
|
||
dependencies: | ||
angular: ^5.0.0-alpha+8 | ||
|
||
dev_dependencies: | ||
build_runner: ^0.8.0 | ||
build_web_compilers: ^0.3.4 |
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,13 @@ | ||
// Copyright (c) 2018, the Dart project authors. 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. | ||
|
||
import 'package:angular/experimental.dart'; | ||
|
||
// ignore: uri_has_not_been_generated | ||
import 'package:webdev_example_app/app_component.template.dart' as ng; | ||
|
||
main() { | ||
// ignore: argument_type_not_assignable | ||
bootstrapFactory(ng.AppComponentNgFactory); | ||
} |
File renamed without changes.
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,40 @@ | ||
#!/bin/bash | ||
# Created with https://github.com/dart-lang/mono_repo | ||
|
||
if [ -z "$PKG" ]; then | ||
echo -e '\033[31mPKG environment variable must be set!\033[0m' | ||
exit 1 | ||
fi | ||
|
||
if [ "$#" == "0" ]; then | ||
echo -e '\033[31mAt least one task argument must be provided!\033[0m' | ||
exit 1 | ||
fi | ||
|
||
pushd $PKG | ||
pub upgrade || exit $? | ||
|
||
EXIT_CODE=0 | ||
|
||
while (( "$#" )); do | ||
TASK=$1 | ||
case $TASK in | ||
dartanalyzer) echo | ||
echo -e '\033[1mTASK: dartanalyzer\033[22m' | ||
echo -e 'dartanalyzer --fatal-infos --fatal-warnings .' | ||
dartanalyzer --fatal-infos --fatal-warnings . || EXIT_CODE=$? | ||
;; | ||
dartfmt) echo | ||
echo -e '\033[1mTASK: dartfmt\033[22m' | ||
echo -e 'dartfmt -n --set-exit-if-changed .' | ||
dartfmt -n --set-exit-if-changed . || EXIT_CODE=$? | ||
;; | ||
*) echo -e "\033[31mNot expecting TASK '${TASK}'. Error!\033[0m" | ||
EXIT_CODE=1 | ||
;; | ||
esac | ||
|
||
shift | ||
done | ||
|
||
exit $EXIT_CODE |
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,10 @@ | ||
# See https://github.com/dart-lang/mono_repo for details | ||
dart: | ||
- dev | ||
|
||
stages: | ||
- analyzer_and_format: | ||
- dartfmt | ||
- dartanalyzer: --fatal-infos --fatal-warnings . | ||
# - unit_test: | ||
# - test |
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 |
---|---|---|
@@ -1,7 +1,22 @@ | ||
// Copyright (c) 2018, the Dart project authors. 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. | ||
|
||
import 'dart:async'; | ||
import 'dart:io'; | ||
|
||
import 'package:webdev/webdev.dart'; | ||
import 'package:args/command_runner.dart'; | ||
import 'package:io/ansi.dart'; | ||
import 'package:io/io.dart'; | ||
import 'package:webdev/src/webdev_command_runner.dart'; | ||
|
||
Future main(List<String> args) async { | ||
await webdevCommandRunner().run(args); | ||
try { | ||
await webdevCommandRunner().run(args); | ||
} on UsageException catch (e) { | ||
print(yellow.wrap(e.message)); | ||
print(' '); | ||
print(e.usage); | ||
exitCode = ExitCode.usage.code; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.