A simple config-driven CLI to initialize JS projects.
You may install globally with NPM from the Github repo but it is recommended to use directly with npx
as detailed in the next section.
npm install -g github:chrisrzhou/init-js
init-js
is an ESM module requiring Node 12+.
Use with npx
:
npx github:chrisrzhou/init-js --github my-github-username --name my-package-name
The --github
and --name
are required arguments that will be used to initialize various files.
Creates the following files:
.github/workflow/main.yml
.editorconfig
.gitignore
license
(MIT)package.json
readme.md
tsconfig.json
You can use a custom config file with the --config
argument.
The base config is personalized for use by the author.
npx init-js --name=my-package-name --github=my-github-username --config=path/to/my-config.json
interface Config {
author: {
firstName: string;
lastName: string;
email: string;
url: string;
github: string;
};
package: NodePackageInterface; // https://nodejs.dev/learn/the-package-json-guide
};