Skip to content

Commit 3b380e0

Browse files
committed
removing gulp in favor of npm-scripts
1 parent 6607e8e commit 3b380e0

File tree

8 files changed

+42
-90
lines changed

8 files changed

+42
-90
lines changed

.eslintrc renamed to .eslintrc.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// adapted from: https://github.com/Khan/style-guides/pull/25
2-
{
3-
"plugins": [
4-
],
2+
module.exports = {
3+
"extends": "eslint:recommended",
54
"ecmaFeatures": {
6-
"modules": true
5+
"modules": false
76
},
87
"env": {
98
"browser": true,
@@ -17,7 +16,6 @@
1716
"camelcase": [2, {
1817
"properties": "always"
1918
}],
20-
"comma-dangle": [1, "always-multiline"],
2119
"comma-dangle": [2, "never"],
2220
"comma-spacing": [2, {
2321
"before": false,
@@ -26,6 +24,7 @@
2624
"eol-last": [0],
2725
"guard-for-in": 2,
2826
//"indent": [2, 4],
27+
"keyword-spacing": 2,
2928
"linebreak-style": [2, "unix"],
3029
/*
3130
"max-len": [2, 80, 4, {
@@ -52,16 +51,13 @@
5251
"prefer-template": 2,
5352
"quotes": [2, "single"],
5453
"semi": [2, "always"],
55-
"space-after-keywords": [2, "always"],
5654
"space-before-blocks": 2,
5755
"space-before-function-paren": [2, {
5856
"anonymous": "always",
5957
"named": "never"
6058
}],
6159
"space-infix-ops": 2,
62-
"space-return-throw-case": 2,
6360
"strict": [0, "never"],
6461
"valid-jsdoc": 2
65-
},
66-
"extends": "eslint:recommended"
67-
}
62+
}
63+
};

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
_ignore/
1+
.idea/
2+
.nyc_output/
23
coverage/
34
node_modules/
45
.DS_Store

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.git*
2-
_ignore/
2+
.idea/
3+
.nyc_output/
4+
coverage/
35
.DS_Store
46
.gitignore
57
.npm-debug.log

.tonic.example.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ var obj = {foo:{bar:'baz'}};
33
var r1 = getPath(obj, 'foo.bar'); // result: "baz"
44
var r2 = getPath(obj, 'foo.invalidKey', 'cool'); // result: "cool"
55
var r3 = getPath(obj, 'foo|bar', null, '|'); // result: "baz" (with different delimiter)
6-
console.log(r1, r2, r3);
6+
var r4 = getPath(obj, ['foo', 'bar']); // result "baz" (with array path)
7+
console.log(r1, r2, r3, r4);

.travis.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
language: node_js
22
node_js:
33
- 'stable'
4-
- '4.2'
5-
- '4.1'
4+
- '6.0'
5+
- '5.0'
66
- '4.0'
77
- '0.12'
88
- '0.11'
99
- '0.10'
10-
before_script:
11-
- npm install -g gulp
1210
script:
13-
- gulp test
14-
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls --verbose
11+
- npm run cover
12+
- npm run coveralls

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ var obj = {foo:{bar:'baz'}};
3232
getPath(obj, 'foo.bar'); // result: "baz"
3333
getPath(obj, 'foo.invalidKey', 'cool'); // result: "cool"
3434
getPath(obj, 'foo|bar', null, '|'); // result: "baz" (with different delimiter)
35+
getPath(obj, ['foo', 'bar']); // result "baz" (with array path)
3536
```
3637

3738
- [Live example on Tonic](https://tonicdev.com/npm/object-path-get)

gulpfile.js

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

package.json

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
"description": "get values from javascript objects by specifying a path",
55
"main": "index.js",
66
"scripts": {
7-
"test": "gulp test",
8-
"prepublish": "gulp test && gulp lint"
7+
"clean": "rimraf .nyc_output/ coverage/",
8+
"cover": "nyc npm test",
9+
"coveralls": "cat coverage/lcov.info | coveralls --verbose",
10+
"lint": "eslint *.js",
11+
"test": "mocha test.js",
12+
"prepublish": "npm-run-all lint test"
913
},
1014
"author": "skratchdot",
1115
"license": "MIT",
@@ -18,15 +22,26 @@
1822
"url": "https://github.com/skratchdot/object-path-get"
1923
},
2024
"devDependencies": {
21-
"chai": "^3.4.1",
22-
"coveralls": "^2.11.4",
23-
"gulp": "^3.9.0",
24-
"gulp-eslint": "^1.1.0",
25-
"gulp-istanbul": "^0.10.2",
26-
"gulp-mocha": "^2.2.0",
27-
"isparta": "^4.0.0"
25+
"chai": "^3.5.0",
26+
"coveralls": "^2.11.12",
27+
"eslint": "^3.4.0",
28+
"mocha": "^3.0.2",
29+
"npm-run-all": "^3.0.0",
30+
"nyc": "^8.1.0",
31+
"rimraf": "^2.5.4"
2832
},
2933
"tonicExampleFilename": ".tonic.example.js",
34+
"nyc": {
35+
"all": true,
36+
"include": [
37+
"index.js"
38+
],
39+
"reporter": [
40+
"text",
41+
"html",
42+
"lcovonly"
43+
]
44+
},
3045
"keywords": [
3146
"object",
3247
"path",

0 commit comments

Comments
 (0)