Skip to content

Commit

Permalink
Remove index.js, index.json from source
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 19, 2016
1 parent 52da70e commit fed94f9
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 190 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
.nyc_output/
coverage/
node_modules/
index.json
weasels.js
weasels.min.js
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
language: node_js
node_js:
- '4.0'
- '5.0'
- '6.0'
after_success: bash <(curl -s https://codecov.io/bash)
- '7.0'
after_script: bash <(curl -s https://codecov.io/bash)
sudo: false
deploy:
- provider: npm
Expand All @@ -12,7 +11,7 @@ deploy:
secure: Qau6SlUg8DviNQPQyiazu7c8VSMXeChcGfNUeRPJbJC+u4gOX2DesfzNiIlJCueHifwdqIp0q8Sabj/EOcuAvSpZwlsRp1lqIaXiTEHZHXxsZRWk6RTkGCKNRG6/rhATE8W7RNdYcan39YR1qpKPdn7svtO0UTi/z7WZsVHp+DQ=
on:
tags: true
node: '5.0'
node: '4.0'
- provider: releases
api_key:
secure: Ll8D7i6u2mSDtcfL12FLixDODn7paHUXfvGsNGlOu3p7juoAuAajPQxr+mtdMhGFkL/QHa8b+3gdiUEy9az0+eKdtFgTaYECTVIbiBGZmu2vlIed1OYy1wan2lKmYAItAt+K9kRNvl6Kp2v1+HFFVSCbIMe1BqvYgCbwud+yShM=
Expand All @@ -21,4 +20,4 @@ deploy:
- "weasels.min.js"
on:
tags: true
node: '6.0'
node: '7.0'
8 changes: 8 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

var fs = require('fs');
var toJSON = require('plain-text-data-to-json');

var data = JSON.stringify(toJSON(fs.readFileSync('data.txt', 'utf8')), null, 2) + '\n';

fs.writeFileSync('index.json', data);
11 changes: 0 additions & 11 deletions history.md

This file was deleted.

12 changes: 0 additions & 12 deletions index.js

This file was deleted.

118 changes: 0 additions & 118 deletions index.json

This file was deleted.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
"word",
"list"
],
"files": [
"index.js",
"index.json"
],
"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)"
],
"main": "index.json",
"files": [
"index.json"
],
"dependencies": {},
"devDependencies": {
"browserify": "^13.0.1",
"esmangle": "^1.0.1",
"nyc": "^8.1.0",
"nyc": "^9.0.1",
"plain-text-data-to-json": "^1.0.0",
"remark-cli": "^2.0.0",
"remark-preset-wooorm": "^1.0.0",
Expand All @@ -31,10 +31,10 @@
},
"scripts": {
"build-md": "remark . --quiet --frail",
"build-generate": "node script/generate.js",
"build-bundle": "browserify index.js --bare -s weasels > weasels.js",
"build-generate": "node build",
"build-bundle": "browserify index.json --bare -s weasels > weasels.js",
"build-mangle": "esmangle weasels.js > weasels.min.js",
"build": "npm run build-md && npm run build-generate && npm run build-bundle && npm run build-mangle",
"build": "npm run build-generate && npm run build-md && npm run build-bundle && npm run build-mangle",
"lint": "xo",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js",
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ _Reportedly_, **weasels** exposes a list of strings (`Array.<string>`).
## Support

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

Note that the words listed in **weasels** _might_ or, in fact, _might_
not be weasels.
Expand Down Expand Up @@ -84,4 +84,4 @@ not be weasels.

[author]: http://wooorm.com

[data]: index.json
[data]: data.txt
23 changes: 0 additions & 23 deletions script/generate.js

This file was deleted.

12 changes: 1 addition & 11 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
/**
* @author Titus Wormer
* @copyright 2014 Titus Wormer
* @license MIT
* @module weasels
* @fileoverview Test suite for `weasels`.
*/

'use strict';

/* Dependencies. */
var test = require('tape');
var weasels = require('./');

/* Tests. */
test('characterEntities', function (t) {
test('weasels', function (t) {
t.equal(typeof weasels, 'object', 'should be an array #1');
t.equal(Array.isArray(weasels), true, 'should be an array #2');
t.notEqual(weasels.indexOf('several'), -1, 'should contain words');
Expand Down

0 comments on commit fed94f9

Please sign in to comment.