Make Camino examples and scaffolds complete Yarn and Nix packages
This commit is contained in:
@@ -23,7 +23,12 @@ const writable = async (directory) => {
|
||||
}
|
||||
};
|
||||
await writable(work);
|
||||
await fs.writeFile(path.join(work, "package.json"), JSON.stringify({ type: "module" }));
|
||||
const packageFile = path.join(work, "package.json");
|
||||
const metadata = await fs.readFile(packageFile, "utf8").then(JSON.parse, (error) => {
|
||||
if (error.code === "ENOENT") return {};
|
||||
throw error;
|
||||
});
|
||||
await fs.writeFile(packageFile, JSON.stringify({ ...metadata, type: "module" }));
|
||||
if (config.dependencies) await fs.symlink(config.dependencies, path.join(work, "node_modules"));
|
||||
const members = Object.create(null);
|
||||
let index = 0;
|
||||
|
||||
Reference in New Issue
Block a user