Skip to content
This repository was archived by the owner on Mar 3, 2021. It is now read-only.

Commit ba44369

Browse files
committed
fix: Installation Error for latest version of Deno #2
1 parent 0371bc6 commit ba44369

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"deno.enable": true,
33
"deno.import_map": "./import_map.json",
4-
"deno.unstable": true
4+
"deno.unstable": true,
5+
"deno.import_intellisense_origins": {
6+
"https://deno.land": true
7+
}
58
}

Commands.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// base code https://github.com/Caesar2011/rhinoder
22

3-
import { readJsonSync, existsSync } from "https://deno.land/std/fs/mod.ts";
3+
import { existsSync } from "https://deno.land/std@0.74.0/fs/mod.ts";
4+
5+
import { readJsonSync } from "https://raw.githubusercontent.com/crewdevio/Trex/master/temp_deps/writeJson.ts";
46

57
import { red, green, yellow } from "https://deno.land/std/fmt/colors.ts";
68

7-
interface IrunJson {
9+
interface runJson {
810
config: {
911
[key: string]: string;
1012
};
@@ -14,19 +16,19 @@ interface IrunJson {
1416
/*
1517
* get object data from run file
1618
*/
17-
const data = readJsonSync("./run.json") as IrunJson;
19+
const data = readJsonSync("./run.json") as runJson;
1820

1921
let throttle = 700;
2022
let timeout: number | null = null;
2123

2224
let errorTrace: string[] = [];
2325

24-
interface Icommands {
26+
interface Commands {
2527
name: string;
2628
run: string[];
2729
}
2830

29-
const commands: Array<Icommands> = [];
31+
const commands: Array<Commands> = [];
3032

3133
function logMessages() {
3234
console.clear();
@@ -58,8 +60,8 @@ if (existsSync("./run.json")) {
5860

5961
const entries = Object.entries(data.config);
6062

61-
entries.forEach((entrie) => {
62-
commands.push({ name: entrie[0], run: entrie[1].split(" ") });
63+
entries.forEach((entries) => {
64+
commands.push({ name: entries[0], run: entries[1].split(" ") });
6365
});
6466
}
6567
} else {
@@ -82,7 +84,7 @@ commands.forEach(({ name }, index) => {
8284
}
8385
});
8486

85-
let taks: Deno.Process = startProcess(args);
87+
let task: Deno.Process = startProcess(args);
8688

8789
function startProcess(args: Array<string>): Deno.Process {
8890
if (args.length < 1) {
@@ -94,8 +96,8 @@ function startProcess(args: Array<string>): Deno.Process {
9496
function runApp() {
9597
logMessages();
9698

97-
taks && taks.close();
98-
taks = startProcess(args);
99+
task && task.close();
100+
task = startProcess(args);
99101
}
100102

101103
let files: string[] | string = data?.files

0 commit comments

Comments
 (0)