-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve uninited dir experience
- Loading branch information
Showing
9 changed files
with
202 additions
and
288 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
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
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,41 @@ | ||
export { ghjk } from "../../mod.ts"; | ||
import { logger, task } from "../../mod.ts"; | ||
import * as ports from "../../ports/mod.ts"; | ||
|
||
task("greet", async ({ $, argv: [name] }) => { | ||
await $`echo Hello ${name}!`; | ||
}); | ||
|
||
const ha = task({ | ||
name: "ha", | ||
installs: [ | ||
ports.protoc(), | ||
], | ||
envVars: { STUFF: "stuffier" }, | ||
async fn({ $ }) { | ||
await $`echo $STUFF; | ||
protoc --version; | ||
`; | ||
}, | ||
}); | ||
|
||
task("ho", { | ||
dependsOn: [ha], | ||
fn: () => logger().info(`ho`), | ||
}); | ||
|
||
task("hii", { | ||
// task `dependsOn` declaration is order-independent | ||
dependsOn: ["hum"], | ||
fn: () => logger().info(`haii`), | ||
}); | ||
|
||
task("hum", { | ||
dependsOn: ["ho"], | ||
fn: () => logger().info(`hum`), | ||
}); | ||
|
||
task("hey", { | ||
dependsOn: ["hii", "ho"], | ||
fn: () => logger().info(`hey`), | ||
}); |
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 |
---|---|---|
@@ -1,69 +1,15 @@ | ||
export { ghjk } from "./mod.ts"; | ||
import * as ghjk from "./mod.ts"; | ||
import { install, stdSecureConfig } from "./mod.ts"; | ||
import * as ports from "./ports/mod.ts"; | ||
|
||
ghjk | ||
.task("greet", { | ||
fn: async ({ $, argv: [name] }) => { | ||
await $`echo Hello ${name}!`; | ||
}, | ||
}); | ||
|
||
const ha = ghjk | ||
.task("ha", { | ||
installs: [ | ||
ports.protoc(), | ||
], | ||
envVars: { STUFF: "stuffier" }, | ||
async fn({ $ }) { | ||
await $`echo $STUFF; | ||
protoc --version; | ||
`; | ||
}, | ||
}); | ||
|
||
const ho = ghjk | ||
.task("ho", { | ||
dependsOn: [ha], | ||
async fn({ $ }) { | ||
await $`echo ho`; | ||
}, | ||
}); | ||
|
||
const hum = ghjk | ||
.task("hum", { | ||
dependsOn: [ho], | ||
async fn({ $ }) { | ||
await $`echo hum`; | ||
}, | ||
}); | ||
|
||
const hii = ghjk | ||
.task("hii", { | ||
dependsOn: [hum], | ||
async fn({ $ }) { | ||
await $`echo haii`; | ||
}, | ||
}); | ||
|
||
ghjk | ||
.task("hey", { | ||
dependsOn: [hii, ho], | ||
async fn({ $ }) { | ||
await $`echo hey`; | ||
}, | ||
}); | ||
|
||
// these are just for quick testing | ||
ghjk.install(); | ||
install(); | ||
|
||
// these are used for developing ghjk | ||
ghjk.install( | ||
install( | ||
ports.act(), | ||
ports.pipi({ packageName: "pre-commit" })[0], | ||
ports.cpy_bs({ releaseTag: "20231002" }), | ||
); | ||
|
||
export const secureConfig = ghjk.secureConfig({ | ||
masterPortDepAllowList: ghjk.stdDeps({ enableRuntimes: true }), | ||
}); | ||
export const secureConfig = stdSecureConfig({ enableRuntimes: true }); |
Oops, something went wrong.