Skip to content

Commit

Permalink
Refactor project
Browse files Browse the repository at this point in the history
* Replace eslint, jscs with xo;
* Remove `index.js`;
* Remove coverage tests;
* Remove superfluous files;
* Remove unneeded Node targets from Travis;
* Update dev-dependencies.
  • Loading branch information
wooorm committed Oct 18, 2016
1 parent d08166f commit cc9a3cd
Show file tree
Hide file tree
Showing 14 changed files with 88 additions and 251 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.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.DS_Store
*.log
coverage/
node_modules/
iso-639-3.js
iso-639-3.min.js
35 changes: 0 additions & 35 deletions .jscs.json

This file was deleted.

13 changes: 0 additions & 13 deletions .remarkrc

This file was deleted.

5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
language: node_js
node_js:
- '0.10'
- '0.11'
- '0.12'
- '4.0'
- '5.0'
- '6.0'
sudo: false
after_script: npm install codecov.io && cat ./coverage/lcov.info | codecov
deploy:
- provider: npm
email: tituswormer@gmail.com
Expand Down
8 changes: 0 additions & 8 deletions example.js

This file was deleted.

6 changes: 0 additions & 6 deletions history.md

This file was deleted.

17 changes: 0 additions & 17 deletions index.js

This file was deleted.

53 changes: 25 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,46 @@
"name",
"information"
],
"dependencies": {},
"files": [
"index.js",
"index.json"
],
"repository": {
"type": "git",
"url": "https://github.com/wooorm/iso-639-3.git"
},
"repository": "https://github.com/wooorm/iso-639-3",
"bugs": "https://github.com/wooorm/iso-639-3/issues",
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)"
],
"main": "index.json",
"files": [
"index.json"
],
"dependencies": {},
"devDependencies": {
"browserify": "^13.0.0",
"concat-stream": "^1.5.1",
"d3-dsv": "^0.3.0",
"eslint": "^2.0.0",
"d3-dsv": "^1.0.0",
"esmangle": "^1.0.1",
"istanbul": "^0.4.0",
"jscs": "^2.0.0",
"jscs-jsdoc": "^1.0.0",
"remark": "^4.0.0",
"remark-comment-config": "^3.0.0",
"remark-github": "^4.0.1",
"remark-lint": "^3.0.0",
"remark-usage": "^3.0.0",
"remark-validate-links": "^3.0.0",
"remark-cli": "^2.0.0",
"remark-preset-wooorm": "^1.0.0",
"tape": "^4.4.0",
"unzip": "^0.1.11"
"unzip": "^0.1.11",
"xo": "^0.17.0"
},
"scripts": {
"build-crawl": "./script/build.js",
"build-crawl": "node script/build.js",
"build-md": "remark . --quiet --frail",
"build-bundle": "browserify index.js --bare -s iso6393 > iso-639-3.js",
"build-bundle": "browserify index.json --bare -s iso6393 > iso-639-3.js",
"build-mangle": "esmangle iso-639-3.js > iso-639-3.min.js",
"build": "npm run build-crawl && npm run build-md && 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",
"lint": "xo",
"test-api": "node test.js",
"test-coverage": "istanbul cover test.js",
"test": "npm run build && npm run lint && npm run test-coverage"
"test": "npm run build && npm run lint && npm run test-api"
},
"xo": {
"space": true,
"ignores": [
"iso-639-3.js"
]
},
"remarkConfig": {
"output": true,
"presets": "wooorm"
}
}
32 changes: 5 additions & 27 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# iso-639-3 [![Build Status][build-badge]][build-page] [![Coverage Status][coverage-badge]][coverage-page]
# iso-639-3 [![Build Status][build-badge]][build-page]

[ISO 639-3][iso] codes in an accessible format, all of them.

Expand All @@ -10,20 +10,17 @@
npm install iso-639-3
```

**iso-639-3** is also available as an AMD, CommonJS, and globals
module, [uncompressed and compressed][releases].

## Usage

Dependencies:

```javascript
var iso6393 = require('iso-639-3');

var subset = iso6393.slice(1820, 1825));
```

Inspecting some values yields:
Yields:

```js
```javascript
[ { name: 'Ende',
type: 'living',
scope: 'individual',
Expand Down Expand Up @@ -61,12 +58,6 @@ Inspecting some values yields:
iso6391: null } ]
```

And the `length` computes to:

```js
7847
```

## API

### `iso6393`
Expand All @@ -91,23 +82,18 @@ And the `length` computes to:
* `'living'`
— Still spoken languages, for example,
`Zacatlán-Ahuacatlán-Tepetzintla Nahuatl` (`nhi`);

* `'historical'`
— Distinct from any modern languages that are descended from it, for
example, `Old Frisian` (`ofs`);

* `'extinct'`
— Language which went extinct in recent time, for example,
`Barababaraba` (`rbp`);

* `'ancient'`
— Language which went extinct in ancient times, for example,
`Gothic` (`got`);

* `'constructed'`
— Artificial languages (but not programming languages), for example,
`Esperanto` (`epo`);

* `'special'`
— Non-language codes, for example, `Undetermined` (`und`).

Expand All @@ -117,11 +103,9 @@ And the `length` computes to:

* `'special'`
— Non-language codes, for example, `Undetermined` (`und`);

* `'macrolanguage'`
— One-to-many grouping of languages, because older ISO 639s,
included them, for example, `Arabic` (`ara`);

* `'language'`
— Normal, single language, for example, `English` (`eng`).

Expand All @@ -135,14 +119,8 @@ And the `length` computes to:

[build-page]: https://travis-ci.org/wooorm/iso-639-3

[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/iso-639-3.svg

[coverage-page]: https://codecov.io/github/wooorm/iso-639-3?branch=master

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

[releases]: https://github.com/wooorm/iso-639-3/releases

[license]: LICENSE

[author]: http://wooorm.com
Expand Down
Loading

0 comments on commit cc9a3cd

Please sign in to comment.