mirror of
https://github.com/penpot/penpot.git
synced 2026-03-30 16:20:34 +02:00
* 🎉 Prepare npm package for MCP server * 🐛 Re-establish Windows compatibility of MCP server build script Use node instead of cp to copy files * ✨ Set version for MCP npm tarball based on git tag * Add scripts/set-version to set the version in package.json based on git describe information * Add scripts/pack to perform the packaging
23 lines
485 B
JavaScript
23 lines
485 B
JavaScript
#!/usr/bin/env node
|
|
|
|
const { execSync } = require("child_process");
|
|
const path = require("path");
|
|
|
|
const root = path.resolve(__dirname, "..");
|
|
|
|
function run(command) {
|
|
execSync(command, { cwd: root, stdio: "inherit" });
|
|
}
|
|
|
|
try {
|
|
run("corepack pnpm run bootstrap");
|
|
} catch (error) {
|
|
if (error.code === "ENOENT") {
|
|
console.error(
|
|
"corepack is required but was not found. It ships with Node.js >= 16."
|
|
);
|
|
process.exit(1);
|
|
}
|
|
process.exit(error.status ?? 1);
|
|
}
|