Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softspiders/node-cli-commander-ts-jest-starter
Node CLI starter on TypeScript which is testing by Jest
https://github.com/softspiders/node-cli-commander-ts-jest-starter
cli commander jest mock node softspiders ss starter template test ts typescript
Last synced: about 1 month ago
JSON representation
Node CLI starter on TypeScript which is testing by Jest
- Host: GitHub
- URL: https://github.com/softspiders/node-cli-commander-ts-jest-starter
- Owner: softspiders
- Created: 2020-02-15T09:38:44.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:52:25.000Z (almost 2 years ago)
- Last Synced: 2024-04-23T22:43:28.545Z (8 months ago)
- Topics: cli, commander, jest, mock, node, softspiders, ss, starter, template, test, ts, typescript
- Language: TypeScript
- Homepage:
- Size: 758 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[SOFTSPIDERS](https://github.com/softspiders/softspiders)
# *node-cli-commander-ts-jest-starter*
*Node* CLI starter on *TypeScript* which is testing by *Jest*
## Feature tags
- cli
- commander
- jest
- mock
- node
- starter
- template
- typescript---
## Direct ancestors
[Node CLI starter](https://github.com/softspiders/node-cli-starter)---
## Requirements
[NodeJS](https://nodejs.org/en/)
---
## Authors
- [levioza](https://github.com/levioza) - original code
- [Alexander Lapygin](https://github.com/AlexanderLapygin) - adaptation to *Jest* and *Soft Spiders*## Inspired by
[levioza](https://github.com/levioza)'s [nodejs-cli-starter-template](https://github.com/levioza/nodejs-cli-starter-template)
---
## Install (download dependencies)
```sh
npm i
```---
## Test
Run
```sh
npm test
```Should see:
```sh
> [email protected] test ${YOUR_PATH}/node-cli-ts-starter
> jestPASS src/__tests__/writer-spec.ts
Writer
#write()
√ should write a message (5ms)
√ should write a default message (1ms)Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 5.733s
Ran all test suites.
```---
## Build
```sh
npm run build
```---
## Install as a CLI
```sh
npm i -g
```## Run
```sh
cli-command
```
or
```sh
cli-command -h
```Should see:
```sh
Usage: cli-command [options] [command]Options:
-V, --version output the version number
-h, --help output usage informationCommands:
write [message] say hello!
help [cmd] display help for [cmd]
```Run
```sh
cli-command -V
```Should see:
```sh
1.0.0
```---
## License
Licensed under the [MIT license](./LICENSE).