-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use npm scripts #42
Use npm scripts #42
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
[tests.js] | ||
indent_size = 4 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
//"validateIndentation": 2, index.js uses 2, and tests.js uses 4. https://github.com/jscs-dev/node-jscs/issues/1106 | ||
"validateQuoteMarks": "'", | ||
"requireSpacesInFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"disallowSpacesInFunctionExpression": { | ||
"beforeOpeningRoundBrace": true | ||
}, | ||
"disallowQuotedKeysInObjects": true, | ||
"disallowMultipleLineStrings": true, | ||
"disallowMultipleSpaces": true, | ||
"requireLineFeedAtFileEnd": true, | ||
"requireSemicolons": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
node_modules/** | ||
node_modules/** |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
{ | ||
"node": true, | ||
"mocha": true, | ||
"strict": true, | ||
"laxcomma": true, | ||
"nomen": false, | ||
"indent": 2 | ||
"strict": true, | ||
"laxcomma": true, | ||
"nomen": false, | ||
"indent": 2 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,9 +28,14 @@ | |
"devDependencies": { | ||
"deep-equal": "~1.0.0", | ||
"expect.js": "^0.3.1", | ||
"mocha": "^2.2.1" | ||
"jscs": "^1.12.0", | ||
"jshint": "^2.6.3", | ||
"mocha": "^2.2.1", | ||
"uglifyjs": "^2.4.10" | ||
}, | ||
"scripts": { | ||
"test": "mocha -R spec" | ||
"uglify": "uglifyjs index.js -o releases/deep-diff-$npm_package_version.min.js -r '$,require,exports,module,window,global' -m --comments '/^!/'", | ||
"pretest": "jscs index.js test/ && jshint index.js test/", | ||
"test": "mocha" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep; I noticed that change a while ago - wasn't when this thing was born. |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "../.jshintrc", | ||
"mocha": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/*global it: false, describe: false, DeepDiffConflict: false*/ | ||
/*global DeepDiffConflict: false*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Covered by |
||
'use strict'; | ||
|
||
if (typeof require === 'function') { | ||
|
@@ -360,35 +360,35 @@ describe('deep-diff', function() { | |
|
||
describe('regression test for bug #10, ', function() { | ||
var lhs = { | ||
"id": "Release", | ||
"phases": [{ | ||
"id": "Phase1", | ||
"tasks": [{ | ||
"id": "Task1" | ||
id: 'Release', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only place you quote keys in objects, so I removed it, and added a JSCS rule for it. |
||
phases: [{ | ||
id: 'Phase1', | ||
tasks: [{ | ||
id: 'Task1' | ||
}, { | ||
"id": "Task2" | ||
id: 'Task2' | ||
}] | ||
}, { | ||
"id": "Phase2", | ||
"tasks": [{ | ||
"id": "Task3" | ||
id: 'Phase2', | ||
tasks: [{ | ||
id: 'Task3' | ||
}] | ||
}] | ||
}; | ||
var rhs = { | ||
"id": "Release", | ||
"phases": [{ | ||
id: 'Release', | ||
phases: [{ | ||
// E: Phase1 -> Phase2 | ||
"id": "Phase2", | ||
"tasks": [{ | ||
"id": "Task3" | ||
id: 'Phase2', | ||
tasks: [{ | ||
id: 'Task3' | ||
}] | ||
}, { | ||
"id": "Phase1", | ||
"tasks": [{ | ||
"id": "Task1" | ||
id: 'Phase1', | ||
tasks: [{ | ||
id: 'Task1' | ||
}, { | ||
"id": "Task2" | ||
id: 'Task2' | ||
}] | ||
}] | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if you want to normalize your indentation. If you do, I'll be happy to give it a whack.