Skip to content

Commit

Permalink
fix: publish lite version
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Jun 19, 2024
1 parent 56cc5b5 commit 845acc1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions scripts/lite.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ if (Object.keys(packageJson.devDependencies).length === 0) delete packageJson.de
packageJson.name = `${ref}-lite`;

fs.writeFileSync(
path.resolve(__dirname, "../lib/dist/package.json"),
path.resolve(__dirname, "../lib/package.json"),
JSON.stringify(packageJson, null, 2),
);

const readMePath = path.resolve(__dirname, "../lib/dist", "README.md");
const readMePath = path.resolve(__dirname, "../lib", "README.md");

let readMe = fs.readFileSync(readMePath, { encoding: "utf8" });
const tmp = "!---";
Expand Down
14 changes: 8 additions & 6 deletions scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ fs.copyFileSync(
path.join(__dirname, "../lib/dist/README.md"),
);

execSync("cd lib/dist && npm publish --provenance --access public");
// execSync("cd lib/dist && npm publish --provenance --access public");

/** Create GitHub release */
execSync(
`gh release create ${VERSION} --generate-notes --latest -n "$(sed '1,/^## /d;/^## /,$d' CHANGELOG.md)" --title "Release v${VERSION}"`,
);
// /** Create GitHub release */
// execSync(
// `gh release create ${VERSION} --generate-notes --latest -n "$(sed '1,/^## /d;/^## /,$d' CHANGELOG.md)" --title "Release v${VERSION}"`,
// );

execSync("node ./scripts/lite.js");
execSync("cd lib && pnpm build && npm publish --provenance --access public");
execSync(
"cd lib && pnpm build && cp package.json dist/package.json && cp README.md dist/README.md && cd dist && npm publish --provenance --access public",
);

0 comments on commit 845acc1

Please sign in to comment.