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 0000000000..7ba349b3e6 Binary files /dev/null and b/dev-containers/dart-web-container/quickstart/web/favicon.ico differ diff --git a/dev-containers/dart-web-container/quickstart/web/index.html b/dev-containers/dart-web-container/quickstart/web/index.html new file mode 100644 index 0000000000..c198dd483d --- /dev/null +++ b/dev-containers/dart-web-container/quickstart/web/index.html @@ -0,0 +1,20 @@ + + + + + + + + + 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; +}