Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/vercel-sandbox/scripts/inject-version.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { version } from "../package.json";
import { writeFile } from "fs/promises";
import { readFile, writeFile } from "fs/promises";
import path from "path";

async function main() {
Comment thread
pranaygp marked this conversation as resolved.
Outdated
const pkgPath = path.resolve(__dirname, "../package.json");
const { version } = JSON.parse(await readFile(pkgPath, "utf-8"));
Comment thread
pranaygp marked this conversation as resolved.
Outdated
const outPath = path.resolve(__dirname, "../src/version.ts");
const content = `// Autogenerated by inject-version.ts\nexport const VERSION = "${version}";\n`;
await writeFile(outPath, content);
Expand Down
Loading