Skip to content

Commit

Permalink
minimum deno example
Browse files Browse the repository at this point in the history
  • Loading branch information
mikearnaldi committed Jan 14, 2023
1 parent 0689a9b commit 80e848e
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.

tasks:
- init: yarn install

- init: yarn install && brew install deno

vscode:
extensions:
- denoland.vscode-deno
1 change: 1 addition & 0 deletions deno/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
4 changes: 4 additions & 0 deletions deno/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"[typescript]": { "editor.defaultFormatter": "denoland.vscode-deno" }
}
6 changes: 6 additions & 0 deletions deno/debug.init.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as Debug from "npm:@effect/io/Debug";

Debug.runtimeDebug.minumumLogLevel = "Debug";
Debug.runtimeDebug.traceExecutionLogEnabled = true;
Debug.runtimeDebug.getCallTrace = Debug.getCallTraceFromNewError;
Debug.runtimeDebug.traceFilter = (trace) => !trace.includes(".deno");
2 changes: 2 additions & 0 deletions deno/debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
deno run --unstable --node-modules-dir debug.ts
2 changes: 2 additions & 0 deletions deno/debug.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import "./debug.init.ts";
import "./main.ts";
2 changes: 2 additions & 0 deletions deno/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
deno cache --unstable --node-modules-dir main.ts
2 changes: 2 additions & 0 deletions deno/main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
deno run --unstable --node-modules-dir main.ts
8 changes: 8 additions & 0 deletions deno/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as Effect from "npm:@effect/io/Effect";

const main = Effect.gen(function* ($) {
yield* $(Effect.log("hello"));
yield* $(Effect.log("world"));
});

Effect.unsafeFork(main);
16 changes: 16 additions & 0 deletions deno/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"strict": true,
"noEmit": true,
"baseUrl": ".",
"paths": {
"npm:*": ["node_modules/*"]
},
"downlevelIteration": true,
"module": "ES2022",
"moduleResolution": "node",
"target": "ES2022",
"skipLibCheck": true
},
"include": ["./**/*.ts"]
}

0 comments on commit 80e848e

Please sign in to comment.