TypeScript template for a Node.js CLI library.
JavaScript build is bundled with Rollup, and .d.ts files are generated by tsc.
npm installnpm run buildnode dist/cli.js --name MaxCLI automatically looks for one of these files in current directory:
infinityloop.config.jsinfinityloop.config.mjsinfinityloop.config.cjs
Example infinityloop.config.js:
module.exports = {
name: "From config"
};Run with auto-detected config:
node dist/cli.jsRun with explicit config path:
node dist/cli.js --config ./infinityloop.config.mjsnode dist/cli.js --help