You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
635 B
24 lines
635 B
const { execSync } = require("child_process"); |
|
|
|
const excalidrawDir = `${__dirname}/../src/packages/excalidraw`; |
|
const excalidrawPackage = `${excalidrawDir}/package.json`; |
|
const pkg = require(excalidrawPackage); |
|
|
|
const publish = () => { |
|
try { |
|
execSync(`yarn --frozen-lockfile`); |
|
execSync(`yarn --frozen-lockfile`, { cwd: excalidrawDir }); |
|
execSync(`yarn run build:umd`, { cwd: excalidrawDir }); |
|
execSync(`yarn --cwd ${excalidrawDir} publish`); |
|
} catch (error) { |
|
console.error(error); |
|
process.exit(1); |
|
} |
|
}; |
|
|
|
const release = () => { |
|
publish(); |
|
console.info(`Published ${pkg.version}!`); |
|
}; |
|
|
|
release();
|
|
|