Skip to content

Latest commit

 

History

History

README.md

CLI template

TypeScript template for a Node.js CLI library. JavaScript build is bundled with Rollup, and .d.ts files are generated by tsc.

Install deps

npm install

Build

npm run build

Run local command

node dist/cli.js --name Max

Config parsing

CLI automatically looks for one of these files in current directory:

  • infinityloop.config.js
  • infinityloop.config.mjs
  • infinityloop.config.cjs

Example infinityloop.config.js:

module.exports = {
  name: "From config"
};

Run with auto-detected config:

node dist/cli.js

Run with explicit config path:

node dist/cli.js --config ./infinityloop.config.mjs

Help

node dist/cli.js --help