-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 63ecec5
Showing
5 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import start from "../start.ts"; | ||
|
||
start(Deno.args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const dukefileName = "./dukefile.ts"; | ||
|
||
let dukefilePath = await Deno.realPath(dukefileName); | ||
|
||
switch (Deno.build.os) { | ||
case "windows": | ||
dukefilePath = dukefilePath.slice("c:".length); | ||
break; | ||
|
||
default: | ||
break; | ||
} | ||
|
||
let dukefile: { [key: string]: Function }; | ||
|
||
try { | ||
dukefile = await import(dukefilePath); | ||
} catch (err) { | ||
console.error("Can not read dukefile", err); | ||
Deno.exit(1); | ||
} | ||
|
||
export default dukefile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import dukefile from "./dukefile.ts"; | ||
|
||
export default function start(args: string[]) { | ||
const taskName = args[0] || "default"; | ||
const task = dukefile[taskName]; | ||
const taskArgs = args.slice(1); | ||
|
||
// Run task | ||
task(...taskArgs); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"baseUrl": ".", | ||
"esModuleInterop": true, | ||
"lib": [ | ||
"esnext" | ||
], | ||
"module": "amd", | ||
"moduleResolution": "node", | ||
"noEmit": true, | ||
"paths": { | ||
// Paths have to be relative to `baseUrl` | ||
"http://*": [ | ||
// This is the OSX location (assumine root is two levels up) | ||
"../../Library/Caches/deno/deps/http/*", | ||
// This is the typical location a Linux | ||
"../../.cache/deno/deps/http/*" | ||
], | ||
"https://*": [ | ||
// This is the OSX location (assumine root is two levels up) | ||
"../../Library/Caches/deno/deps/https/*", | ||
// This is the typical location a Linux | ||
"../../.cache/deno/deps/https/*" | ||
] | ||
}, | ||
"plugins": [ | ||
{ | ||
"name": "deno_ls_plugin" | ||
} | ||
], | ||
"pretty": true, | ||
"resolveJsonModule": true, | ||
"target": "esnext" | ||
}, | ||
"include": [ | ||
"./**/*.ts" | ||
] | ||
} |