-
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.
feat(envs): dynamic variables for envs (#95)
* feat(envs): dynamic env * feat: dyn env naive (wip) * feat(envs): dynamic env (wip) * fix: attempt taskless approach * refactor: reducer * fix: dyn env reducer * feat: dyn env * test: dyn env, move impl to reducers * fix: pre-commit, remove unused import * fix: use hack.ts instead * chore: bump to 0.2.1 --------- Co-authored-by: Yohe-Am <[email protected]>
- Loading branch information
1 parent
100eb76
commit 1c05f97
Showing
17 changed files
with
230 additions
and
35 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 @@ | ||
import { file } from "../../hack.ts"; | ||
|
||
const ghjk = file({ | ||
defaultEnv: "empty", | ||
envs: [{ name: "empty", inherit: false }], | ||
defaultBaseEnv: "empty", | ||
allowedBuildDeps: [], | ||
installs: [], | ||
stdDeps: true, | ||
enableRuntimes: true, | ||
tasks: {}, | ||
}); | ||
|
||
export const sophon = ghjk.sophon; | ||
const { env, task } = ghjk; | ||
|
||
env("main") | ||
.var("A", "A#STATIC") | ||
.var("C", ($) => $`echo C [$A, $B]`.text()) | ||
.var("B", () => "B#DYNAMIC") | ||
.onEnter(task(($) => $`echo enter $A, $B, $C`)); |
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
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
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
Oops, something went wrong.