Skip to content

Commit

Permalink
deno 4 matt
Browse files Browse the repository at this point in the history
  • Loading branch information
trilom committed Apr 1, 2021
1 parent d032790 commit 0ed56f3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 10 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "deno",
"runtimeArgs": ["test", "--inspect=127.0.0.1:9229","--unstable", "--allow-read", "--allow-write", "--allow-env", "--import-map=import_map.json"],
"runtimeArgs": [
"test",
"--inspect=127.0.0.1:9229",
"--unstable",
"--allow-read",
"--allow-write",
"--allow-env",
"--import-map=import_map.json"
],
"port": 9229,
"outputCapture": "std",
"outputCapture": "std"
}
]
}
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,11 @@ console.log(
);
console.log(C.random("test some string", rConf)); // random function
```

### Config

**Simple**

```typescript
import { EnvConfig, StringConfig } from "trailmix/config/mod.ts";

Expand All @@ -163,9 +166,11 @@ console.log(EnvConfig.parseEnv()); // should have { test1: "val1", console: { le
// this is good for cmd line arguments (--consoleLevel DEBUG)
console.log(StringConfig.parseEnv({ test1: "val1", consoleLevel: "DEBUG" })); // should have same as above
```

**Complex**

```typescript
import { Config,EnvConfig, StringConfig } from "trailmix/config/mod.ts";
import { Config, EnvConfig, StringConfig } from "trailmix/config/mod.ts";

// lets use our own namespace with a config file
const c = await new Config({
Expand All @@ -181,10 +186,9 @@ console.log(new StringConfig(c).parseLog()); // will give a log config with {con
Deno.env.set("TRAILMIX_CONSOLE_FORMAT", "console");
console.log(new EnvConfig(c).parseLog()); // will give a log config with {console: { format: "console" } }
```

### Log

### Watch



## [CONTRIBUTE](CONTRIBUTE.md)

0 comments on commit 0ed56f3

Please sign in to comment.