-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build and serve commands to run in an isolate (#6)
Add example angular app to experiment with.
- Loading branch information
Showing
15 changed files
with
134 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Experimental Usage | ||
|
||
The example directory contains a package that is configured to work with | ||
`pub run webdev <command>`. Support for `pub global activate webdev` and simply | ||
adding a dev_dependency to your packages is coming soon. | ||
|
||
## Commands | ||
|
||
* __build__: Run builders to build a package. | ||
* __help__: Display help information for webdev. | ||
* __serve__: Run a local web development server and a file system watcher that | ||
re-builds on 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,3 @@ | ||
:host { | ||
/* This is equivalent of the 'body' selector of a page. */ | ||
} |
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 @@ | ||
import 'package:angular/angular.dart'; | ||
|
||
import 'src/hello_world/hello_world.dart'; | ||
|
||
@Component( | ||
selector: 'my-app', | ||
styleUrls: const ['app_component.css'], | ||
templateUrl: 'app_component.html', | ||
directives: const [HelloWorldComponent], | ||
) | ||
class AppComponent { | ||
// 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,3 @@ | ||
<h1>Webdev Example: Angular App</h1> | ||
|
||
<hello-world></hello-world> |
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,3 @@ | ||
div { | ||
color: teal; | ||
} |
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 @@ | ||
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,25 @@ | ||
name: webdev_example_app | ||
description: A web app example for webdev CLI. | ||
version: 0.0.1 | ||
|
||
environment: | ||
sdk: ">=2.0.0-dev.3.0 <2.0.0" | ||
|
||
dependencies: | ||
angular: ^5.0.0-alpha+3 | ||
browser: ^0.10.0 | ||
|
||
dev_dependencies: | ||
webdev: | ||
path: ../ | ||
############################################################################## | ||
# Temporary until build_runner exposes a function to generate it's script. | ||
build_runner: | ||
git: | ||
url: https://github.com/dart-lang/build.git | ||
path: build_runner | ||
############################################################################## | ||
|
||
dependency_overrides: | ||
# Necessary with angular: ^5.0.0-alpha+1 dependency. | ||
analyzer: ^0.31.0-alpha.1 |
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 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>webdev example</title> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<script defer src="main.dart" type="application/dart"></script> | ||
<script defer src="packages/browser/dart.js"></script> | ||
<link rel="stylesheet" href="styles.css"> | ||
</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,7 @@ | ||
import 'package:angular/angular.dart'; | ||
import 'package:webdev_example_app/app_component.dart'; | ||
import 'main.template.dart' as ng; | ||
|
||
main() { | ||
bootstrapStatic(AppComponent, [/*providers*/], ng.initReflector); | ||
} |
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 @@ | ||
@import url(https://fonts.googleapis.com/css?family=Roboto); | ||
@import url(https://fonts.googleapis.com/css?family=Material+Icons); | ||
|
||
body { | ||
max-width: 600px; | ||
margin: 0 auto; | ||
padding: 5vw; | ||
} | ||
|
||
* { | ||
font-family: Roboto, Helvetica, Arial, sans-serif; | ||
} |
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
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