Skip to content

Commit

Permalink
Rewrite module
Browse files Browse the repository at this point in the history
* Remove support for Duo;
* Refactor code-style;
* Update docs;
* Update tests.
  • Loading branch information
wooorm committed Jul 30, 2016
1 parent a9de05b commit d450b06
Show file tree
Hide file tree
Showing 20 changed files with 103 additions and 363 deletions.
8 changes: 1 addition & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@ root = true

[*]
indent_style = space
indent_size = 4
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{json,remarkrc,eslintrc,sh}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DS_Store
*.log
components/
.nyc_output/
coverage/
node_modules/
weasels.js
Expand Down
36 changes: 0 additions & 36 deletions .jscs.json

This file was deleted.

1 change: 0 additions & 1 deletion .remarkignore

This file was deleted.

13 changes: 0 additions & 13 deletions .remarkrc

This file was deleted.

11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
language: node_js
node_js:
- '0.10'
- '0.11'
- '0.12'
- '4.0'
- '5.0'
- iojs
- '6.0'
after_success: bash <(curl -s https://codecov.io/bash)
sudo: false
after_script: npm install codecov.io && cat ./coverage/lcov.info | codecov
deploy:
- provider: npm
email: [email protected]
api_key:
secure: Qau6SlUg8DviNQPQyiazu7c8VSMXeChcGfNUeRPJbJC+u4gOX2DesfzNiIlJCueHifwdqIp0q8Sabj/EOcuAvSpZwlsRp1lqIaXiTEHZHXxsZRWk6RTkGCKNRG6/rhATE8W7RNdYcan39YR1qpKPdn7svtO0UTi/z7WZsVHp+DQ=
secure: Qau6SlUg8DviNQPQyiazu7c8VSMXeChcGfNUeRPJbJC+u4gOX2DesfzNiIlJCueHifwdqIp0q8Sabj/EOcuAvSpZwlsRp1lqIaXiTEHZHXxsZRWk6RTkGCKNRG6/rhATE8W7RNdYcan39YR1qpKPdn7svtO0UTi/z7WZsVHp+DQ=
on:
tags: true
node: '5.0'
- provider: releases
api_key:
secure: Ll8D7i6u2mSDtcfL12FLixDODn7paHUXfvGsNGlOu3p7juoAuAajPQxr+mtdMhGFkL/QHa8b+3gdiUEy9az0+eKdtFgTaYECTVIbiBGZmu2vlIed1OYy1wan2lKmYAItAt+K9kRNvl6Kp2v1+HFFVSCbIMe1BqvYgCbwud+yShM=
secure: Ll8D7i6u2mSDtcfL12FLixDODn7paHUXfvGsNGlOu3p7juoAuAajPQxr+mtdMhGFkL/QHa8b+3gdiUEy9az0+eKdtFgTaYECTVIbiBGZmu2vlIed1OYy1wan2lKmYAItAt+K9kRNvl6Kp2v1+HFFVSCbIMe1BqvYgCbwud+yShM=
file:
- "weasels.js"
- "weasels.min.js"
on:
tags: true
node: '6.0'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(The MIT License)

Copyright (c) 2016 Titus Wormer <mailto:[email protected]>
Copyright (c) 2014 Titus Wormer <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
19 changes: 0 additions & 19 deletions component.json

This file was deleted.

File renamed without changes.
11 changes: 3 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
/**
* @author Titus Wormer
* @copyright 2016 Titus Wormer
* @copyright 2014 Titus Wormer
* @license MIT
* @module weasels
* @fileoverview List of (possible) English weasel words.
*/

'use strict';

/* eslint-env commonjs */

/*
* Expose.
*/

module.exports = require('./data/index.json');
/* Expose. */
module.exports = require('./index.json');
File renamed without changes.
69 changes: 42 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,58 @@
],
"files": [
"index.js",
"data/index.json"
"index.json"
],
"repository": {
"type": "git",
"url": "https://github.com/wooorm/weasels.git"
},
"repository": "https://github.com/wooorm/weasels",
"bugs": "https://github.com/wooorm/weasels/issues",
"author": "Titus Wormer <[email protected]> (http://wooorm.com)",
"contributors": [
"Titus Wormer <[email protected]> (http://wooorm.com)"
],
"dependencies": {},
"devDependencies": {
"browserify": "^13.0.0",
"eslint": "^1.0.0",
"esmangle": "^1.0.0",
"istanbul": "^0.4.0",
"jscs": "^2.0.0",
"jscs-jsdoc": "^1.0.0",
"plain-text-data-to-json": "^0.1.3",
"remark": "^3.0.0",
"remark-comment-config": "^2.0.2",
"remark-github": "^3.0.0",
"remark-lint": "^2.2.1",
"remark-slug": "^3.0.1",
"remark-validate-links": "^2.0.2",
"tape": "^4.0.0"
"browserify": "^13.0.1",
"esmangle": "^1.0.1",
"nyc": "^7.0.0",
"plain-text-data-to-json": "^1.0.0",
"remark-cli": "^1.0.0",
"remark-comment-config": "^4.0.0",
"remark-github": "^5.0.0",
"remark-lint": "^4.0.0",
"remark-validate-links": "^4.0.0",
"tape": "^4.0.0",
"xo": "^0.16.0"
},
"scripts": {
"build-md": "remark . --quiet --frail",
"build-data": "node script/build-data.js",
"build-support": "node script/build-support.js",
"build-generate": "node script/generate.js",
"build-bundle": "browserify index.js --bare -s weasels > weasels.js",
"build-mangle": "esmangle weasels.js > weasels.min.js",
"build": "npm run build-md && npm run build-data && npm run build-support && npm run build-bundle && npm run build-mangle",
"lint-api": "eslint .",
"lint-style": "jscs --reporter inline .",
"lint": "npm run lint-api && npm run lint-style",
"test-api": "node test.js",
"test-coverage": "istanbul cover test.js",
"build": "npm run build-md && npm run build-generate && npm run build-bundle && npm run build-mangle",
"lint": "xo",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js",
"test": "npm run build && npm run lint && npm run test-coverage"
},
"xo": {
"space": true,
"ignores": [
"weasels.js",
"weasels.min.js"
]
},
"remarkConfig": {
"output": true,
"plugins": {
"comment-config": null,
"github": null,
"lint": {
"list-item-spacing": false
},
"validate-links": null
},
"settings": {
"bullet": "*"
}
}
}
49 changes: 17 additions & 32 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ List of _many_ English, both British and American, weasel words.
npm install weasels
```

**weasels** is also available for [duo][duo-install], and as an
AMD, CommonJS, and globals module, [uncompressed and compressed][releases].

## Usage

```js
Expand All @@ -25,32 +22,29 @@ console.log(weasels.slice(0, 10));

Yields:

```json
[
"a lot",
"about",
"acts",
"again",
"all",
"almost",
"already",
"also",
"anyway",
"appeared"
]
```js
[ 'a lot',
'about',
'acts',
'again',
'all',
'almost',
'already',
'also',
'anyway',
'appeared' ]
```

## API

### `weasels`

**Type**: `Array.<string>`_Reportedly_, **weasels** exposes a list
of strings.
_Reportedly_, **weasels** exposes a list of strings (`Array.<string>`).

## Support

**weasels** supports _several_ weasel words and phrases. For a complete
list, see [support.md][support].
list, see [index.json][data].

Note that the words listed in **weasels** _might_ or, in fact, _might_
not be weasels.
Expand All @@ -59,19 +53,14 @@ not be weasels.

* [buzzwords](https://github.com/wooorm/buzzwords)
— List of buzzwords;

* [dale-chall](https://github.com/wooorm/dale-chall)
— List of familiar American-English words (1995);

* [fillers](https://github.com/wooorm/fillers)
— List of filler words.

— List of filler words;
* [hedges](https://github.com/wooorm/hedges)
— List of hedge words;

— List of hedge words.
* [profanities](https://github.com/wooorm/profanities)
— List of profane words;

* [spache](https://github.com/wooorm/spache)
— List of simple American-English words (1974);

Expand All @@ -91,12 +80,8 @@ not be weasels.

[npm-install]: https://docs.npmjs.com/cli/install

[duo-install]: http://duojs.org/#getting-started

[releases]: https://github.com/wooorm/weasels/releases

[license]: LICENSE

[support]: support.md

[author]: http://wooorm.com

[data]: index.json
38 changes: 0 additions & 38 deletions script/build-data.js

This file was deleted.

Loading

0 comments on commit d450b06

Please sign in to comment.