Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
dart web container
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Feb 5, 2019
1 parent 4411da7 commit 815095b
Show file tree
Hide file tree
Showing 13 changed files with 125 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dev-containers/dart-web-container/.vscode/devContainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"dockerFile": "dart-dev-container.dockerfile",
"extensions": [
"dart-code.dart-code"
],
"appPort": 8080
}
19 changes: 19 additions & 0 deletions dev-containers/dart-web-container/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Dart: Attach to Process",
"type": "dart",
"request": "attach"
},
{
"name": "Dart",
"type": "dart",
"request": "launch",
"program": "quickstart/web/main.dart"
}
]
}
9 changes: 9 additions & 0 deletions dev-containers/dart-web-container/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Dart Dev Container Sample

* `cd quickstart`
* `pub get`
* `webdev serve --hostname 0.0.0.0 --live-reload`

* Open [localhost:8080](http://localhost:8080)

* Make changes to `main.dart`
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM google/dart
ENV PATH="$PATH":"/root/.pub-cache/bin"
RUN pub global activate webdev
11 changes: 11 additions & 0 deletions dev-containers/dart-web-container/quickstart/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Files and directories created by pub
.dart_tool/
.packages
# Remove the following pattern if you wish to check in your lock file
pubspec.lock

# Conventional directory for build outputs
build/

# Directory created by dartdoc
doc/api/
3 changes: 3 additions & 0 deletions dev-containers/dart-web-container/quickstart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version, created by Stagehand
4 changes: 4 additions & 0 deletions dev-containers/dart-web-container/quickstart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
An absolute bare-bones web app.

Created from templates made available by Stagehand under a BSD-style
[license](https://github.com/dart-lang/stagehand/blob/master/LICENSE).
14 changes: 14 additions & 0 deletions dev-containers/dart-web-container/quickstart/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Defines a default set of lint rules enforced for
# projects at Google. For details and rationale,
# see https://github.com/dart-lang/pedantic#enabled-lints.
include: package:pedantic/analysis_options.yaml

# For lint rules and documentation, see http://dart-lang.github.io/linter/lints.
# Uncomment to specify additional rules.
# linter:
# rules:
# - camel_case_types

analyzer:
# exclude:
# - path/to/excluded/files/**
16 changes: 16 additions & 0 deletions dev-containers/dart-web-container/quickstart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: quickstart
description: An absolute bare-bones web app.
# version: 1.0.0
#homepage: https://www.example.com
#author: Your Name <email@example.com>

environment:
sdk: '>=2.1.0 <3.0.0'

#dependencies:
# path: ^1.4.1

dev_dependencies:
build_runner: ^1.1.2
build_web_compilers: ^1.0.0
pedantic: ^1.0.0
Binary file not shown.
20 changes: 20 additions & 0 deletions dev-containers/dart-web-container/quickstart/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="scaffolded-by" content="https://github.com/google/stagehand">
<title>quickstart</title>
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="favicon.ico">
<script defer src="main.dart.js"></script>
</head>

<body>

<div id="output"></div>

</body>
</html>
5 changes: 5 additions & 0 deletions dev-containers/dart-web-container/quickstart/web/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import 'dart:html';

void main() {
querySelector('#output').text = 'Your Dartww111 app is running.';
}
14 changes: 14 additions & 0 deletions dev-containers/dart-web-container/quickstart/web/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@import url(https://fonts.googleapis.com/css?family=Roboto);

html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
font-family: 'Roboto', sans-serif;
}

#output {
padding: 20px;
text-align: center;
}

0 comments on commit 815095b

Please sign in to comment.