summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2021-01-09 22:33:59 +0000
committergumiko <git@gumi.ca>2021-01-09 22:40:13 +0000
commita0b124bc80ead9733452638d25895a6522f5f2f0 (patch)
treef418ce5cb3093b7beb1c010efd1c2964202497ca
parent90fd3155ad57efc06c763f45a89ac4668e9be1e3 (diff)
downloadpolicies-a0b124bc80ead9733452638d25895a6522f5f2f0.tar.gz
policies-a0b124bc80ead9733452638d25895a6522f5f2f0.tar.bz2
policies-a0b124bc80ead9733452638d25895a6522f5f2f0.tar.xz
policies-a0b124bc80ead9733452638d25895a6522f5f2f0.zip
[ci skip] add vscode and gitpod integration
-rw-r--r--.gitpod.yml14
-rw-r--r--.vscode/settings.json5
-rw-r--r--.vscode/tasks.json51
-rw-r--r--README.md3
4 files changed, 73 insertions, 0 deletions
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 0000000..d9f6886
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,14 @@
+tasks:
+ - before: make deno
+ init: make
+ # docs: https://browsersync.io/docs/command-line
+ command: npx browser-sync start --server build --files build --port 8080 --no-ui --no-notify --open "gp preview $(gp url 8080)"
+
+ports:
+ - port: 8080
+ visibility: private
+ onOpen: open-preview
+
+vscode:
+ extensions:
+ - denoland.vscode-deno
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..40fc23f
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,5 @@
+{
+ "deno.enable": true, // enables extension
+ "deno.lint": true, // inline deno lint diagnostics, requires `deno.unstable`
+ "deno.unstable": true // also provides unstable type declarations in VS Code
+}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 0000000..aef8e07
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,51 @@
+{
+// See https://go.microsoft.com/fwlink/?LinkId=733558
+// for the documentation about the tasks.json format
+"version": "2.0.0",
+"tasks": [
+ {
+ "label": "open preview",
+ "type": "shell",
+ "command": "gp preview $(gp url 8080)",
+ "group": "test",
+ "presentation": {
+ "reveal": "never",
+ "panel": "shared"
+ },
+ "problemMatcher": []
+ },
+ {
+ "label": "launch server",
+ "type": "shell",
+ "command": "npx browser-sync start --server build --files build --port 8080 --no-ui --no-notify --open \"gp preview $(gp url 8080)\"",
+ "group": "none",
+ "presentation": {
+ "reveal": "never",
+ "panel": "shared"
+ },
+ "problemMatcher": []
+ },
+ {
+ "label": "install Deno",
+ "type": "shell",
+ "command": "make deno",
+ "group": "none",
+ "presentation": {
+ "reveal": "silent",
+ "panel": "shared"
+ },
+ "problemMatcher": []
+ },
+ {
+ "label": "generate static site",
+ "type": "shell",
+ "command": "make",
+ "group": "build",
+ "presentation": {
+ "reveal": "silent",
+ "panel": "shared"
+ },
+ "problemMatcher": []
+ }
+]
+}
diff --git a/README.md b/README.md
index fbd4d12..222dc33 100644
--- a/README.md
+++ b/README.md
@@ -46,3 +46,6 @@ content
```sh
make build
```
+
+## Instant prototyping [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-click_to_open-blue?logo=gitpod)](https://gitpod.io/#https://gitlab.com/evol/policies)
+Click the badge to launch a pre-configured online IDE