Skip to content

Commit

Permalink
option to remove lite mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Jan 7, 2025
1 parent 6e5166c commit 8b82edb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/rebrand.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ const rebrandFn = async () => {
message:
"Generators are used to generate boilerplate code for new packages. They might not be required for a few libraries.",
},
{
name: "LiteMode",
message: "If you do not want to create a lite version of your lib",
},
],
});

Expand Down Expand Up @@ -182,6 +186,19 @@ const rebrandFn = async () => {
);
}

if (feats.includes("LiteMode")) {
["./scripts/lite.js"].forEach(dirOrfile => execSync("rm -rf " + dirOrfile));
["publish.js", "manual-publish.js"].forEach(src =>
fs.writeFileSync(
fs
.readFileSync(path.resolve(process.cwd(), "scripts", src), "utf-8")
.split("\n")
.slice(-3)
.join("\n"),
),
);
}

const rootDir = process.cwd();
try {
fs.writeFileSync(
Expand Down

0 comments on commit 8b82edb

Please sign in to comment.