-
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
1 parent
8249690
commit 4ff94c5
Showing
4 changed files
with
39 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
vendor |
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 |
---|---|---|
|
@@ -9,14 +9,15 @@ | |
}, | ||
"lock": false, | ||
"tasks": { | ||
"dev": "deno test --watch -A" | ||
"dev": "deno test --watch -A", | ||
"vendor": "deno run -A vendor.ts" | ||
}, | ||
"imports": { | ||
"#/": "./", | ||
"@sinclair/typebox": "npm:@sinclair/typebox@^0.33.14", | ||
"@sinclair/typebox-codegen": "npm:@sinclair/typebox-codegen@^0.10.5", | ||
"@std/assert": "jsr:@std/assert@^1.0.6", | ||
"common-tree-sitter-languages/": "https://github.com/jeff-hykin/common_tree_sitter_languages/raw/e0395e3a6e552b0fa73500d5b724735a52936067/main/", | ||
"deno-tree-sitter/": "https://deno.land/x/[email protected]/" | ||
"deno-tree-sitter/": "./vendor/deno.land/x/tree_sitter/vendor/deno.land/x/[email protected]/", | ||
"common-tree-sitter-languages/": "./vendor/raw.githubusercontent.com/jeff-hykin/common_tree_sitter_languages/#e0395e3a6e552b0fa735_8bb8d/main/" | ||
} | ||
} |
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,30 @@ | ||
if (import.meta.main) { | ||
const cacheSubcommand = makeCacheSubcommand({ | ||
"https://deno.land/x/[email protected]/": [ | ||
"tree_sitter.js", | ||
"main.js", | ||
], | ||
"https://github.com/jeff-hykin/common_tree_sitter_languages/raw/e0395e3a6e552b0fa73500d5b724735a52936067/main/": | ||
["typescript.js"], | ||
}); | ||
|
||
const cacheSubcommandOutput = await cacheSubcommand.output(); | ||
if (!cacheSubcommandOutput.success) { | ||
Deno.exit(1); | ||
} | ||
} | ||
|
||
export function makeCacheSubcommand( | ||
httpsImports: Record<string, string[]>, | ||
): Deno.Command { | ||
return new Deno.Command( | ||
Deno.execPath(), | ||
{ | ||
args: [ | ||
"cache", | ||
...Object.entries(httpsImports) | ||
.flatMap(([url, paths]) => paths.map((path) => `${url}${path}`)), | ||
], | ||
}, | ||
); | ||
} |