Skip to content

Commit

Permalink
Merge pull request #16 from stevemao/refactor/typos
Browse files Browse the repository at this point in the history
refactor(typos): move into source code
  • Loading branch information
hutson authored Dec 8, 2017
2 parents 51959f2 + fe987de commit e50487f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This module extracts the code from the [npm package manager](https://github.com/

If you are interested, please check those other packages for more details.

For more information on which typos can be handled, please see [typos.json](typos.json).
Common misspelling of the [repository](https://docs.npmjs.com/files/package.json#repository) field are also corrected (Please see the source code for available corrections.).

**This module mutates/normalizes the input using `normalize-package-data`.**

Expand Down Expand Up @@ -83,7 +83,9 @@ Contents of `pkgData` are mutated/normalized by `normalize-package-data`.

Type: `boolean`

If you want to fix your typical typos automatically, pass true. See [the list of predefined typos](typos.json).
If you want to fix your typical typos automatically pass `true`.

> Please keep in mind that this feature may be removed in the future. The [`repository`](https://docs.npmjs.com/files/package.json#repository) field in `package.json` is well documented and it should be correctly spelled.
## CLI

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var parseSlug = require('parse-github-repo-url');
var normalizeData = require('normalize-package-data');
var hostedGitInfo = require('hosted-git-info');
var url = require('url');
var typos = require('./typos');
var typos = ['repostitory', 'repostitorys', 'repositories', 'repostitories', 'repositorys', 'repo', 'repos'];

var gitAt = /^git@/;

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"license": "MIT",
"files": [
"index.js",
"cli.js",
"typos.json"
"cli.js"
],
"keywords": [
"get-pkg-repo",
Expand Down
1 change: 0 additions & 1 deletion typos.json

This file was deleted.

0 comments on commit e50487f

Please sign in to comment.