Skip to content

Commit b48cac9

Browse files
authored
Merge pull request #65 from ZeeCoder/tooling-updates
Tooling updates
2 parents 0891c1a + fb93054 commit b48cac9

File tree

6 files changed

+16
-54
lines changed

6 files changed

+16
-54
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ docs
1919
# node-waf configuration
2020
.lock-wscript
2121

22-
# Distribution / Build directory
23-
dist/
24-
2522
# Dependency directory
2623
node_modules
2724

doc.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

index.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/json-truncate.js renamed to json-truncate.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
// configurables
24
let maxDepth
35
let replace
@@ -74,4 +76,4 @@ truncate.reset = () => {
7476

7577
truncate.reset()
7678

77-
export default truncate
79+
module.exports = truncate

package.json

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
"name": "json-truncate",
33
"version": "0.0.0-semantically-released",
44
"description": "A way to truncate a json object.",
5-
"main": "index.js",
5+
"main": "json-truncate.js",
66
"scripts": {
77
"precommit": "npm run lint && npm run coverage",
88
"commit": "git-cz",
99
"lint": "standard",
1010
"coverage": "nyc npm t && npm run coverage-report",
1111
"coverage-report": "nyc report --reporter=lcov",
12-
"doc": "esdoc -c doc.json",
13-
"test": "npm run build && _mocha --compilers js:babel-register",
12+
"test": "mocha",
1413
"prebuild": "rimraf dist",
14+
"doc": "jsdoc json-truncate.js -d docs",
1515
"predoc": "rimraf docs",
16-
"build": "babel --copy-files --out-dir dist src",
1716
"travis": "npm run precommit"
1817
},
18+
"engines": {
19+
"node": ">=6.0.0"
20+
},
1921
"repository": {
2022
"type": "git",
2123
"url": "https://github.com/mrsteele/json-truncate.git"
@@ -35,47 +37,32 @@
3537
"js"
3638
],
3739
"author": "Matt Steele <matt@omnionline.us> (http://omnionline.us)",
40+
"contributors": [
41+
"Viktor Hubert <rpgmorpheus@gmail.com> (https://hubertviktor.com)"
42+
],
3843
"license": "MIT",
3944
"bugs": {
4045
"url": "https://github.com/mrsteele/json-truncate/issues"
4146
},
4247
"homepage": "https://github.com/mrsteele/json-truncate#readme",
4348
"devDependencies": {
44-
"babel-cli": "^6.10.1",
45-
"babel-eslint": "^10.0.2",
46-
"babel-preset-es2015": "^6.9.0",
47-
"babel-register": "^6.9.0",
4849
"chai": "^4.0.2",
4950
"commitizen": "^4.0.0",
5051
"cz-conventional-changelog": "^3.0.0",
51-
"esdoc": "^1.0.1",
52+
"jsdoc": "^3.6.3",
5253
"mocha": "^5.0.0",
5354
"nyc": "^14.1.0",
5455
"rimraf": "^3.0.0",
5556
"standard": "^13.0.1"
5657
},
57-
"files": [
58-
"dist",
59-
"src",
60-
"README.md"
61-
],
6258
"config": {
6359
"commitizen": {
6460
"path": "./node_modules/cz-conventional-changelog"
6561
}
6662
},
67-
"standard": {
68-
"parser": "babel-eslint",
69-
"ignore": "/dist/"
70-
},
71-
"babel": {
72-
"presets": [
73-
"es2015"
74-
]
75-
},
7663
"nyc": {
7764
"include": [
78-
"src/**/*.js"
65+
"json-truncate.js"
7966
]
8067
}
8168
}

test/mocha.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global describe, it */
2-
import chai from 'chai'
3-
import src from '../src/json-truncate'
2+
const chai = require('chai')
3+
const src = require('../json-truncate')
44

55
const expect = chai.expect
66
chai.should()

0 commit comments

Comments
 (0)