Small CLI scaffold used for examples and tests.
- Running locally
- Running tests (Jest)
- CI (GitHub Actions)
- How to open a PR with these changes
- Project Structure
- Contributing
- License
- Acknowledgments
Install dependencies:
npm installRun the CLI:
node ./bin/cli.js hello
node ./bin/cli.js help helloRun the test suite:
npm testRun tests with coverage:
npm test -- --coverageA workflow is provided at .github/workflows/ci.yml. It runs the Jest suite across Linux, Windows, and macOS for Node.js 18 and 20 and uploads coverage artifacts for each matrix job.
The workflow uploads coverage to Codecov for public repositories by default. To enable uploads for private repos, add a CODECOV_TOKEN repository secret and the workflow will use it.
I cannot open a remote PR from this environment. To create a PR locally:
- Create a new branch:
git checkout -b feature/ci-readme- Commit the changes:
git add .
git commit -m "Add CI workflow, tests, and README"- Push and open a PR on GitHub:
git push -u origin feature/ci-readmeThen open a PR from the branch in the repository UI.
If you want, I can prepare a patch or branch here for you to push.
└── cli-scaffold/
├── bin/
│ └── cli.js
├── config/
│ └── default.config.js
├── coverage/
│ ├── lcov-report/
│ │ ├── base.css
│ │ ├── block-navigation.js
│ │ ├── favicon.png
│ │ ├── index.html
│ │ ├── prettify.css
│ │ ├── prettify.js
│ │ ├── sort-arrow-sprite.png
│ │ └── sorter.js
│ ├── clover.xml
│ ├── coverage-final.json
│ └── lcov.info
├── src/
│ ├── commands/
│ │ └── hello/
│ │ ...
│ ├── config.js
│ ├── index.js
│ ├── mergeConfig.js
│ └── resolveValue.js
├── test/
│ ├── __tests__/
│ │ ├── cascading-config.test.js
│ │ ├── config-flag.test.js
│ │ ├── debug-quiet-flags.test.js
│ │ └── help-hello.test.js
│ ├── config-flag.js
│ ├── debug-quiet-flags.js
│ └── help-hello.js
├── .prettierrc.json
├── CHANGELOG.md
├── CONTRIBUTING.md
├── eslint.config.mjs
├── LICENSE
├── markdown-magic.config.js
├── package-lock.json
├── package.json
├── README.md
└── RULES_OF_CONDUCT.md
See CONTRIBUTING.md for details on how to raise issues, propose changes, and submit pull requests. In short:
- Open issues for bugs or feature requests with clear reproduction steps.
- For code contributions, fork the repo, create a branch, add tests, and open a PR against
main.
This project is licensed under the terms of the MIT License. See the LICENSE file for details.
Thanks to the following projects and tools used in this repository:
- @eslint/js — ESLint JavaScript language implementation
- @eslint/markdown — The official ESLint language plugin for Markdown
- commander — the complete solution for node.js command-line programs
- cosmiconfig — Find and load configuration from a package.json property, rc file, TypeScript module, and more!
- cross-spawn — Cross platform child_process#spawn and child_process#spawnSync
- eslint — An AST-based pattern checker for JavaScript.
- eslint-plugin-json — eslint plugin for JSON files
- eslint-plugin-yaml — Lint YAML files
- jest — Delightful JavaScript Testing.
- jsonc-eslint-parser — JSON, JSONC and JSON5 parser for use with ESLint plugins
- markdown-eslint-parser — The ESLint custom parser for *.md files.
- markdown-magic-scripts — Automatically generate a dynamic, customizable dashboard of your npm scripts in your README.md using this markdown-magic transform. Keep your project documentation in sync with your package.json.
- markdown-magic-transform-badges — No description available
- minimist — parse argument options
- prettier — Prettier is an opinionated code formatter
- yaml-eslint-parser — A YAML parser that produces output compatible with ESLint