Skip to content

Commit

Permalink
Add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sderosiaux committed Aug 16, 2015
1 parent a89662a commit a89cdb0
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 625 deletions.
16 changes: 3 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz

pids
logs
results

npm-debug.log
node_modules
dist
lib
coverage
4 changes: 4 additions & 0 deletions .istanbul.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# used for istanbul/isparta to care only about src
# otherwise it crashes https://github.com/douglasduteil/isparta/issues/47
instrumentation:
root: src
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Simple implementation of the k-means clustering method.

# How to use
### How to use

```javascript
import kmeans, { Point } from 'algo-kmeans';
Expand All @@ -28,19 +28,37 @@ const clusters = kmeans(points, {
});
```

# Install
### Install

With [npm](https://npmjs.org) do:

```
npm install algo-kmeans
```

# Testing
### Commands

```
npm test
Lifecycle scripts included in algo-kmeans:
test
_mocha --compilers js:babel/register
prepublish
npm run build && npm run build:umd
available via `npm run-script`:
build
babel src --out-dir lib
clean
rimraf lib dist
build:umd
webpack src/index.js dist/kmeans.js && set NODE_ENV=production&& webpack src/index.js dist/kmeans.min.js
test:watch
_mocha watch
test:cov
babel-node ./node_modules/isparta/bin/isparta cover ./node_modules/mocha/bin/_mocha
lint
eslint src test
```
# License
### License

MIT

0 comments on commit a89cdb0

Please sign in to comment.