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

Commit

Permalink
Sample fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Mar 21, 2019
1 parent bd2c592 commit 1da6745
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 60 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ This repository contains a set of **dev container definition** files such as `de

## Trying a definition

1. Check out the README under the definition folder in `definitions` to see if there are any manual steps
2. Clone this repository or copy the contents of the folder to your machine
3. Run the **Remote: Open Folder in Container...** command in VS Code
4. Select the definition folder in the folder open dialog
1. Open a folder in the `definitions` folder
2. Check out the README to see if there are any manual steps
3. Clone this repository or copy the contents of the folder to your machine
4. Run the **Remote: Open Folder in Container...** command in VS Code
5. Select the definition folder in the "open" dialog

Many definitions come with a `test-project` that you can use to see everything working along with a `launch.json`.

Expand Down
7 changes: 4 additions & 3 deletions definitions/dart-web/.vscode/devContainer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "Dart",
"dockerFile": "dev-container.dockerfile",
"appPort": 8080,
"extensions": [
"dart-code.dart-code"
],
"appPort": 8080
"dart-code.dart-code",
"msjsdiag.debugger-for-chrome"
]
}
3 changes: 2 additions & 1 deletion definitions/dart-web/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"name": "Dart",
"type": "dart",
"request": "launch",
"program": "test-project/web/main.dart"
"program": "test-project/web/main.dart",
"preLaunchTask": "Serve"
}
]
}
12 changes: 12 additions & 0 deletions definitions/dart-web/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Serve",
"type": "shell",
"command": "cd test-project && webdev serve --hostname 0.0.0.0 --live-reload"
}
]
}
10 changes: 1 addition & 9 deletions definitions/dart-web/Readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
## 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`
# Dart Dev Container
4 changes: 3 additions & 1 deletion definitions/dart-web/dev-container.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM google/dart
FROM google/dart:2

ENV PATH="$PATH":"/root/.pub-cache/bin"

RUN pub global activate webdev

# Install git
Expand Down
3 changes: 0 additions & 3 deletions definitions/dart-web/test-project/CHANGELOG.md

This file was deleted.

13 changes: 0 additions & 13 deletions definitions/dart-web/test-project/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# 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/**
10 changes: 2 additions & 8 deletions definitions/dart-web/test-project/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
name: quickstart
description: An absolute bare-bones web app.
# version: 1.0.0
#homepage: https://www.example.com
#author: Your Name <email@example.com>
name: testproject
description: A test project

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
Expand Down
Binary file removed definitions/dart-web/test-project/web/favicon.ico
Binary file not shown.
4 changes: 1 addition & 3 deletions definitions/dart-web/test-project/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
<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>
<title>Test Project</title>
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="favicon.ico">
<script defer src="main.dart.js"></script>
</head>

Expand Down
2 changes: 1 addition & 1 deletion definitions/dart-web/test-project/web/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'dart:html';

void main() {
querySelector('#output').text = 'Your Dartww111 app is running.';
querySelector('#output').text = 'Everything worked!!';
}
14 changes: 0 additions & 14 deletions definitions/dart-web/test-project/web/styles.css

This file was deleted.

0 comments on commit 1da6745

Please sign in to comment.