From 815095b6479cfa5f5a678158e469f2bc1b0cedf1 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 5 Feb 2019 17:09:04 +0100 Subject: [PATCH] dart web container --- .../.vscode/devContainer.json | 7 ++++++ .../dart-web-container/.vscode/launch.json | 19 +++++++++++++++++ dev-containers/dart-web-container/Readme.md | 9 ++++++++ .../dart-dev-container.dockerfile | 3 +++ .../dart-web-container/quickstart/.gitignore | 11 ++++++++++ .../quickstart/CHANGELOG.md | 3 +++ .../dart-web-container/quickstart/README.md | 4 ++++ .../quickstart/analysis_options.yaml | 14 ++++++++++++ .../quickstart/pubspec.yaml | 16 ++++++++++++++ .../quickstart/web/favicon.ico | Bin 0 -> 3559 bytes .../quickstart/web/index.html | 20 ++++++++++++++++++ .../quickstart/web/main.dart | 5 +++++ .../quickstart/web/styles.css | 14 ++++++++++++ 13 files changed, 125 insertions(+) create mode 100644 dev-containers/dart-web-container/.vscode/devContainer.json create mode 100644 dev-containers/dart-web-container/.vscode/launch.json create mode 100644 dev-containers/dart-web-container/Readme.md create mode 100755 dev-containers/dart-web-container/dart-dev-container.dockerfile create mode 100644 dev-containers/dart-web-container/quickstart/.gitignore create mode 100644 dev-containers/dart-web-container/quickstart/CHANGELOG.md create mode 100644 dev-containers/dart-web-container/quickstart/README.md create mode 100644 dev-containers/dart-web-container/quickstart/analysis_options.yaml create mode 100644 dev-containers/dart-web-container/quickstart/pubspec.yaml create mode 100644 dev-containers/dart-web-container/quickstart/web/favicon.ico create mode 100644 dev-containers/dart-web-container/quickstart/web/index.html create mode 100644 dev-containers/dart-web-container/quickstart/web/main.dart create mode 100644 dev-containers/dart-web-container/quickstart/web/styles.css diff --git a/dev-containers/dart-web-container/.vscode/devContainer.json b/dev-containers/dart-web-container/.vscode/devContainer.json new file mode 100644 index 0000000000..b3c2e2fa79 --- /dev/null +++ b/dev-containers/dart-web-container/.vscode/devContainer.json @@ -0,0 +1,7 @@ +{ + "dockerFile": "dart-dev-container.dockerfile", + "extensions": [ + "dart-code.dart-code" + ], + "appPort": 8080 +} diff --git a/dev-containers/dart-web-container/.vscode/launch.json b/dev-containers/dart-web-container/.vscode/launch.json new file mode 100644 index 0000000000..a741261aa1 --- /dev/null +++ b/dev-containers/dart-web-container/.vscode/launch.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/dev-containers/dart-web-container/Readme.md b/dev-containers/dart-web-container/Readme.md new file mode 100644 index 0000000000..1938073bb7 --- /dev/null +++ b/dev-containers/dart-web-container/Readme.md @@ -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` \ No newline at end of file diff --git a/dev-containers/dart-web-container/dart-dev-container.dockerfile b/dev-containers/dart-web-container/dart-dev-container.dockerfile new file mode 100755 index 0000000000..2eb7058e3f --- /dev/null +++ b/dev-containers/dart-web-container/dart-dev-container.dockerfile @@ -0,0 +1,3 @@ +FROM google/dart +ENV PATH="$PATH":"/root/.pub-cache/bin" +RUN pub global activate webdev diff --git a/dev-containers/dart-web-container/quickstart/.gitignore b/dev-containers/dart-web-container/quickstart/.gitignore new file mode 100644 index 0000000000..50602ac67e --- /dev/null +++ b/dev-containers/dart-web-container/quickstart/.gitignore @@ -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/ diff --git a/dev-containers/dart-web-container/quickstart/CHANGELOG.md b/dev-containers/dart-web-container/quickstart/CHANGELOG.md new file mode 100644 index 0000000000..687440bac9 --- /dev/null +++ b/dev-containers/dart-web-container/quickstart/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version, created by Stagehand diff --git a/dev-containers/dart-web-container/quickstart/README.md b/dev-containers/dart-web-container/quickstart/README.md new file mode 100644 index 0000000000..0dd3b612f3 --- /dev/null +++ b/dev-containers/dart-web-container/quickstart/README.md @@ -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). diff --git a/dev-containers/dart-web-container/quickstart/analysis_options.yaml b/dev-containers/dart-web-container/quickstart/analysis_options.yaml new file mode 100644 index 0000000000..a686c1b456 --- /dev/null +++ b/dev-containers/dart-web-container/quickstart/analysis_options.yaml @@ -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/** diff --git a/dev-containers/dart-web-container/quickstart/pubspec.yaml b/dev-containers/dart-web-container/quickstart/pubspec.yaml new file mode 100644 index 0000000000..4b58b3bbff --- /dev/null +++ b/dev-containers/dart-web-container/quickstart/pubspec.yaml @@ -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 + +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 diff --git a/dev-containers/dart-web-container/quickstart/web/favicon.ico b/dev-containers/dart-web-container/quickstart/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7ba349b3e628d2423d4a2ed217422a4722f73739 GIT binary patch literal 3559 zcmV|z)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Olsk^pSVZR4(AZM7hvEebZwgR987~DJRT$~4t`JN z@IV4P-6z6hXeZ}5TxI0SRjTv?3$ouKS*60hr&tvtLe{uv^Z_W4m}z-GL@GnHGIPk* zw6ctFod^P(OD!y`KXwnJ@4>QqH;FL@i7G0^fC~dyCpy$y;qkr9N%VyCOuRPafGQLB 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 + + + + + + + +
+ + + diff --git a/dev-containers/dart-web-container/quickstart/web/main.dart b/dev-containers/dart-web-container/quickstart/web/main.dart new file mode 100644 index 0000000000..dd24d31df6 --- /dev/null +++ b/dev-containers/dart-web-container/quickstart/web/main.dart @@ -0,0 +1,5 @@ +import 'dart:html'; + +void main() { + querySelector('#output').text = 'Your Dartww111 app is running.'; +} diff --git a/dev-containers/dart-web-container/quickstart/web/styles.css b/dev-containers/dart-web-container/quickstart/web/styles.css new file mode 100644 index 0000000000..cc035c95c9 --- /dev/null +++ b/dev-containers/dart-web-container/quickstart/web/styles.css @@ -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; +}