Skip to content

Commit

Permalink
Updated Dev Dependencies and ESLint config
Browse files Browse the repository at this point in the history
  • Loading branch information
SanichKotikov committed May 22, 2017
1 parent 58f6d86 commit d14f85f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 29 deletions.
8 changes: 6 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
"ecmaVersion": 8,
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
"extends": "eslint:recommended",
"predef": "jQuery",
"rules": {
"curly": "error",
"semi": [1, "always"],
"no-console": 2,
"no-control-regex": 0,
Expand Down
3 changes: 1 addition & 2 deletions automation/building.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ gulp.task("babel", function () {
function babelFunc(){
return gulp.src("src/**/*")
.pipe(babel({
presets: ['es2015'],
plugins: [["transform-es2015-classes", {loose: true}]]
presets: ['es2015', 'stage-3']
}))
.pipe(gulp.dest("bin/"));
}
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@
},
"homepage": "https://github.com/lindell/JsBarcode#readme",
"devDependencies": {
"babel-cli": "^6.6.5",
"babel-core": "^6.7.5",
"babel-loader": "^6.2.4",
"babel-plugin-transform-es2015-classes": "^6.6.5",
"babel-plugin-transform-runtime": "^6.6.0",
"babel-preset-es2015": "^6.6.0",
"babel-cli": "^6.24.1",
"babel-core": "^6.24.1",
"babel-loader": "^7.0.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-3": "6.24.1",
"blanket": "^1.2.3",
"canvas": "^1.0.0",
"canvas": "^1.6.5",
"coveralls": "^2.11.6",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
Expand All @@ -61,7 +60,7 @@
"publish-release": "^1.2.0",
"request": "^2.72.0",
"run-sequence": "^1.1.5",
"webpack": "^2.1.0-beta.5",
"webpack": "^2.5.1",
"webpack-stream": "^3.1.0",
"xmldom": "^0.1.27"
},
Expand Down
18 changes: 1 addition & 17 deletions src/help/merge.js
Original file line number Diff line number Diff line change
@@ -1,17 +1 @@
export default merge;

function merge(old, replaceObj) {
var newMerge = {};
var k;
for (k in old) {
if (old.hasOwnProperty(k)) {
newMerge[k] = old[k];
}
}
for (k in replaceObj) {
if(replaceObj.hasOwnProperty(k) && typeof replaceObj[k] !== "undefined"){
newMerge[k] = replaceObj[k];
}
}
return newMerge;
}
export default (old, replaceObj) => ({ ...old, ...replaceObj });

0 comments on commit d14f85f

Please sign in to comment.