UNPKG

@candle-so/node

Version:

A library for interacting with the Candle API

18 lines (17 loc) 792 B
"use strict"; exports.__esModule = true; var fs = require("fs"); var child_process_1 = require("child_process"); // Read the package.json file var packageJson = JSON.parse(fs.readFileSync("package.json", "utf8")); // Increment the version number var versionParts = packageJson.version.split("."); versionParts[2] = parseInt(versionParts[2], 10) + 1; packageJson.version = versionParts.join("."); // Write the updated package.json file fs.writeFileSync("package.json", JSON.stringify(packageJson, null, 2), "utf8"); // Run the build command (0, child_process_1.execSync)("npm run build", { stdio: "inherit" }); // Publish the package (0, child_process_1.execSync)("npm publish --access public", { stdio: "inherit" }); console.log("Successfully deployed version ".concat(packageJson.version));