Skip to content

Commit 8b82edb

Browse files
committed
option to remove lite mode
1 parent 6e5166c commit 8b82edb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/rebrand.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ const rebrandFn = async () => {
144144
message:
145145
"Generators are used to generate boilerplate code for new packages. They might not be required for a few libraries.",
146146
},
147+
{
148+
name: "LiteMode",
149+
message: "If you do not want to create a lite version of your lib",
150+
},
147151
],
148152
});
149153

@@ -182,6 +186,19 @@ const rebrandFn = async () => {
182186
);
183187
}
184188

189+
if (feats.includes("LiteMode")) {
190+
["./scripts/lite.js"].forEach(dirOrfile => execSync("rm -rf " + dirOrfile));
191+
["publish.js", "manual-publish.js"].forEach(src =>
192+
fs.writeFileSync(
193+
fs
194+
.readFileSync(path.resolve(process.cwd(), "scripts", src), "utf-8")
195+
.split("\n")
196+
.slice(-3)
197+
.join("\n"),
198+
),
199+
);
200+
}
201+
185202
const rootDir = process.cwd();
186203
try {
187204
fs.writeFileSync(

0 commit comments

Comments
 (0)