Skip to content

Commit

Permalink
chore(setup): add license for wop
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed Oct 15, 2024
1 parent b4dd3cf commit b8f3ccd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/setup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ let repoName = (
path.basename(repo, ".git") || path.basename(process.cwd())
).toLowerCase();

let isWop = user === "wopjs";

let pkgName = argv("name") || `@${user}/${repoName}`;
let docsURL = `https://${user}.github.io/${repoName}`;

Expand All @@ -22,7 +24,7 @@ pkg.name = pkgName;
pkg.description = argv("description") || repoName;
pkg.keywords = [];
pkg.repository = repo || `${user}/${repoName}`;
if (user !== "wopjs") {
if (!isWop) {
pkg.maintainers = void 0;
}

Expand All @@ -32,6 +34,10 @@ readme = readme.replace(/wopjs\/template/g, `${user}/${repoName}`);
readme = readme.replace("https://wopjs.github.io/template", docsURL);
readme = readme.replace("Collection of common utilities.", `${repoName}.`);

if (isWop) {
readme += "\n## License\n\nMIT @ [wopjs](https://github.com/wopjs)\n";
}

fs.writeFileSync("package.json", JSON.stringify(pkg, null, 2) + "\n");
fs.writeFileSync("README.md", readme);
fs.rmSync("README.template.md");
Expand Down

0 comments on commit b8f3ccd

Please sign in to comment.