Skip to content

Commit

Permalink
Merge pull request pkgxdev#234 from otherJL0/deno-config
Browse files Browse the repository at this point in the history
Adding deno.config
  • Loading branch information
mxcl authored Dec 8, 2022
2 parents 42c2785 + 76950a0 commit 2072511
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 53 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
tea
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"deno.lint": true,
"deno.unstable": true,
"deno.importMap": "./import-map.json",
"deno.config": "./tsconfig.json",
"deno.config": "./deno.json",
"markdownlint.config": {
"extends": "./.github/markdownlint.yml"
}
}
}
43 changes: 4 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -856,60 +856,25 @@ section.
> massaging.
```sh
export TMPDIR=${TMPDIR:-/tmp}
deno test \
--allow-net \
--allow-read \
--allow-env=SRCROOT,TMPDIR,TEA_PREFIX,MAGIC,JSON,NUMPTY,PATH,HOME \
--allow-run \
--import-map=$SRCROOT/import-map.json \
--allow-write=$TEA_PREFIX/tea.xyz/var,$TMPDIR \
--unstable \
"$SRCROOT"/tests/**/*.test.ts
deno task test
```
### Typecheck
```sh
deno check \
--import-map="$SRCROOT"/import-map.json \
--unstable \
src/app.ts \
"$SRCROOT"/scripts/*.ts
deno task typecheck
```
### Run
```sh
deno run \
--import-map="$SRCROOT"/import-map.json \
--unstable \
--allow-all \
"$SRCROOT"/src/app.ts
deno task run
```
### Compile
```sh
OUT="$1"
if test -z "$OUT"; then
OUT="./tea"
else
shift
fi
deno compile \
--allow-read \
--allow-write \
--allow-net \
--allow-run \
--allow-env \
--unstable \
--import-map="$SRCROOT/import-map.json" \
--output "$OUT" \
"$@" \
"$SRCROOT/src/app.ts"
deno task compile
```
### Install Self
Expand Down
21 changes: 21 additions & 0 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"allowJs": false,
"strict": true
},
"importMap": "import-map.json",
"tasks": {
"test": "deno test --allow-net --allow-read --allow-env --allow-run --allow-write --unstable",
"typecheck": "deno check --unstable ./src/app.ts",
"run": "deno run --unstable --allow-all ./src/app.ts",
"compile": "deno compile --allow-read --allow-write --allow-net --allow-run --allow-env --unstable --output tea ./src/app.ts"
},
// ignore all files since the current style deviates from deno's default style.
"fmt": {
"files": {
"exclude": [
"./"
]
}
}
}
12 changes: 0 additions & 12 deletions tsconfig.json

This file was deleted.

0 comments on commit 2072511

Please sign in to comment.