refactor: make this repo a Deno workspace (#2719)
This commit is contained in:
+5
-11
@@ -17,21 +17,15 @@ async function withTmpDir(fn: (dir: string) => void | Promise<void>) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Patch project dependencies until there is an easier way
|
||||
// to link JSR dependencies
|
||||
async function patchProject(dir: string): Promise<void> {
|
||||
const jsonPath = path.join(dir, "deno.json");
|
||||
const json = JSON.parse(await Deno.readTextFile(jsonPath));
|
||||
const rootJson = JSON.parse(
|
||||
await Deno.readTextFile(
|
||||
path.join(import.meta.dirname!, "..", "..", "deno.json"),
|
||||
),
|
||||
);
|
||||
|
||||
json.imports = rootJson.imports;
|
||||
json.imports["fresh"] = "../src/mod.ts";
|
||||
json.imports["fresh/dev"] = "../src/dev/mod.ts";
|
||||
json.imports["@fresh/plugin-tailwind"] = "../plugin-tailwindcss/src/mod.ts";
|
||||
json.workspace = [];
|
||||
// See https://github.com/denoland/deno/issues/27313
|
||||
// json.patch = [path.fromFileURL(new URL("../..", import.meta.url))];
|
||||
json.patch = [new URL("../..", import.meta.url).href];
|
||||
|
||||
// assert with this stricter rule, before adding it to initialized projects
|
||||
json.lint.rules.include = ["verbatim-module-syntax"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user