From 1da6745841e5674befac03964f3423b22576cc89 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Thu, 21 Mar 2019 15:59:42 -0700 Subject: [PATCH] Sample fixes --- README.md | 9 +++++---- definitions/dart-web/.vscode/devContainer.json | 7 ++++--- definitions/dart-web/.vscode/launch.json | 3 ++- definitions/dart-web/.vscode/tasks.json | 12 ++++++++++++ definitions/dart-web/Readme.md | 10 +--------- definitions/dart-web/dev-container.dockerfile | 4 +++- definitions/dart-web/test-project/CHANGELOG.md | 3 --- .../dart-web/test-project/analysis_options.yaml | 13 ------------- definitions/dart-web/test-project/pubspec.yaml | 10 ++-------- .../dart-web/test-project/web/favicon.ico | Bin 3559 -> 0 bytes definitions/dart-web/test-project/web/index.html | 4 +--- definitions/dart-web/test-project/web/main.dart | 2 +- definitions/dart-web/test-project/web/styles.css | 14 -------------- 13 files changed, 31 insertions(+), 60 deletions(-) create mode 100644 definitions/dart-web/.vscode/tasks.json delete mode 100644 definitions/dart-web/test-project/CHANGELOG.md delete mode 100644 definitions/dart-web/test-project/web/favicon.ico delete mode 100644 definitions/dart-web/test-project/web/styles.css diff --git a/README.md b/README.md index dc7ecd0cf6..f88af4697f 100644 --- a/README.md +++ b/README.md @@ -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`. diff --git a/definitions/dart-web/.vscode/devContainer.json b/definitions/dart-web/.vscode/devContainer.json index ad5682d7a8..ea5cf328f2 100644 --- a/definitions/dart-web/.vscode/devContainer.json +++ b/definitions/dart-web/.vscode/devContainer.json @@ -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" + ] } diff --git a/definitions/dart-web/.vscode/launch.json b/definitions/dart-web/.vscode/launch.json index 771bcc4e5c..d10ebd2b8d 100644 --- a/definitions/dart-web/.vscode/launch.json +++ b/definitions/dart-web/.vscode/launch.json @@ -13,7 +13,8 @@ "name": "Dart", "type": "dart", "request": "launch", - "program": "test-project/web/main.dart" + "program": "test-project/web/main.dart", + "preLaunchTask": "Serve" } ] } \ No newline at end of file diff --git a/definitions/dart-web/.vscode/tasks.json b/definitions/dart-web/.vscode/tasks.json new file mode 100644 index 0000000000..3cbc203a87 --- /dev/null +++ b/definitions/dart-web/.vscode/tasks.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/definitions/dart-web/Readme.md b/definitions/dart-web/Readme.md index 1938073bb7..a32968ce5d 100644 --- a/definitions/dart-web/Readme.md +++ b/definitions/dart-web/Readme.md @@ -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` \ No newline at end of file +# Dart Dev Container \ No newline at end of file diff --git a/definitions/dart-web/dev-container.dockerfile b/definitions/dart-web/dev-container.dockerfile index dacbd9b0e0..3801c839d9 100755 --- a/definitions/dart-web/dev-container.dockerfile +++ b/definitions/dart-web/dev-container.dockerfile @@ -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 diff --git a/definitions/dart-web/test-project/CHANGELOG.md b/definitions/dart-web/test-project/CHANGELOG.md deleted file mode 100644 index 687440bac9..0000000000 --- a/definitions/dart-web/test-project/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.0 - -- Initial version, created by Stagehand diff --git a/definitions/dart-web/test-project/analysis_options.yaml b/definitions/dart-web/test-project/analysis_options.yaml index a686c1b456..108d1058ac 100644 --- a/definitions/dart-web/test-project/analysis_options.yaml +++ b/definitions/dart-web/test-project/analysis_options.yaml @@ -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/** diff --git a/definitions/dart-web/test-project/pubspec.yaml b/definitions/dart-web/test-project/pubspec.yaml index 4b58b3bbff..9ede9b9817 100644 --- a/definitions/dart-web/test-project/pubspec.yaml +++ b/definitions/dart-web/test-project/pubspec.yaml @@ -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 +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 diff --git a/definitions/dart-web/test-project/web/favicon.ico b/definitions/dart-web/test-project/web/favicon.ico deleted file mode 100644 index 7ba349b3e628d2423d4a2ed217422a4722f73739..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3559 zcmV|z)fLATAcZDKyK$JdGY~s=NSr`PnS}BvP$+3A z8CpoogqBhg+p;Cg51fS9@izOF7~1r6zw|?g zDQ!X_8B4l7_wKH=QY>4NwW55uUP;#D-rxP7bI-kdjtU{9Dpi9&%XV3<*GkWK^P@NG zgWRw6Vb?`n$T_Evx_k{$?y0Rh-E#b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QLB zzxU5Nx5-m}$bfT6kttLODx@M`to1wZ2XmNi7JNd^g%aAUV6e$$mBbisA;#D$#u!)` zw}J0?$bOnExiyeYuJhSrI5vUQ{Xnh5v4#|I^i3@pb{W7_{P2k5GK==kbAYr zd@D&R#;~Cu!m^6Z1Sv9BK^_RF-@KuRkuuEQ=LX6u&}L20<6F-P1JfjkL^$kk*d@$ZG_p zlDS-4dId>x;8Ix))Ft8KEW?C11O-;*xfWL`Qzk1{Ldf+^h!aB1=lxg-30(gpl+6{; zlAp7sn($go>tSNJPRTIkIh2%t4%H;e)d~Xy$^IHbwmS{eULGp}7eC>K>x%RdXHl9i z=pa>P`f>La2+w!sQ%|I9!8C>-&H_}9-U;=8E{GN8praR|_~}w{8h=S2<}S6&1}__C z{K0ykqcUgtgVR>NYFus(0ow+ctv$LRyQjfxf3DtV-(8H>5U@W7MVi`%u=AlE% - - quickstart + Test Project - diff --git a/definitions/dart-web/test-project/web/main.dart b/definitions/dart-web/test-project/web/main.dart index dd24d31df6..cf898cc689 100644 --- a/definitions/dart-web/test-project/web/main.dart +++ b/definitions/dart-web/test-project/web/main.dart @@ -1,5 +1,5 @@ import 'dart:html'; void main() { - querySelector('#output').text = 'Your Dartww111 app is running.'; + querySelector('#output').text = 'Everything worked!!'; } diff --git a/definitions/dart-web/test-project/web/styles.css b/definitions/dart-web/test-project/web/styles.css deleted file mode 100644 index cc035c95c9..0000000000 --- a/definitions/dart-web/test-project/web/styles.css +++ /dev/null @@ -1,14 +0,0 @@ -@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; -}