Skip to content

Commit 7d13dbb

Browse files
committed
docs(detector): updated readme
1 parent 73d43e7 commit 7d13dbb

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

detector/README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
# @smelly/cli
1+
# @smelly/detector
22

33
[![Continuous Integration Workflow](https://github.com/marabesi/smelly-test/actions/workflows/nodejs.yml/badge.svg)](https://github.com/marabesi/smelly-test/actions/workflows/nodejs.yml)
44

55
[![https://nodei.co/npm/smelly-cli.png?downloads=true&downloadRank=true&stars=true](https://nodei.co/npm/smelly-cli.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/smelly-cli)
66

7+
This package is part of the smelly package and containers the egine that detects test smells on javascript/typescript
8+
files. It provides an interface eacy of comsuption for different ends.
79

8-
Smelly is a command line tool application that helps javascript/typescript developers to keep their test
9-
suite away from test smells.
10-
11-
## Command Line Interface
10+
## Installation
1211

1312
```sh
14-
npm run cli -- path/to/file/test.js typescript
13+
npm install --save smelly-detector
1514
```
1615

17-
## Resources
16+
## Programmatically using detector
17+
18+
The detector package can be used as a standalone package.
19+
20+
```typescript
21+
import { SmellDetector } from 'smelly-detector';
1822

19-
- [Tailwind CSS Table - Flowbite](https://flowbite.com/docs/components/tables)
20-
- [Handlebars](https://handlebarsjs.com/guide/#what-is-handlebars)
23+
const detector = new SmellDetector("my source code", "javascript");
24+
25+
console.log(detector.findAll());
26+
```

0 commit comments

Comments
 (0)