Skip to content

Commit

Permalink
Add .editorconfig, move jsonata.js to src
Browse files Browse the repository at this point in the history
  • Loading branch information
s100 authored and mattbaileyuk committed May 29, 2018
1 parent e898a4d commit 25b030f
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
coverage/
doc/
jsonata.js
jsonata.min.js
jsonata-es5.js
jsonata-es5.min.js
Expand Down
Binary file added jsonata-1.5.5.tgz
Binary file not shown.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsonata",
"version": "1.5.4",
"version": "1.5.5",
"description": "JSON query and transformation language",
"module": "jsonata.js",
"main": "jsonata-es5.js",
Expand All @@ -14,14 +14,15 @@
"pretest": "npm run lint",
"mocha": "node ./node_modules/istanbul/lib/cli.js cover --report cobertura --report html ./node_modules/mocha/bin/_mocha -- \"test/**/*.js\"",
"test": "npm run mocha",
"posttest": "npm run check-coverage && npm run minify && npm run babel && npm run browserify && npm run minify-es5",
"posttest": "npm run check-coverage && npm run copy && npm run minify && npm run babel && npm run browserify && npm run minify-es5",
"copy": "ncp src/jsonata.js ./jsonata.js",
"check-coverage": "istanbul check-coverage -statement 100 -branch 100 -function 100 -line 100",
"minify": "uglifyjs jsonata.js -o jsonata.min.js --compress --mangle",
"lint": "eslint .",
"lint": "eslint ./src",
"doc": "jsdoc --configure jsdoc.json .",
"cover": "istanbul cover _mocha",
"coveralls": "npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls",
"babel": "node ./node_modules/babel-cli/bin/babel.js --out-file jsonata-es5.js jsonata.js",
"babel": "node ./node_modules/babel-cli/bin/babel.js --out-file jsonata-es5.js src/jsonata.js",
"browserify": "node ./node_modules/browserify/bin/cmd.js jsonata-es5.js --outfile jsonata-es5.js --standalone jsonata",
"minify-es5": "uglifyjs jsonata-es5.js -o jsonata-es5.min.js --compress --mangle"
},
Expand Down Expand Up @@ -49,6 +50,7 @@
"jsdoc": "^3.4.0",
"mocha": "^5.0.0",
"mocha-lcov-reporter": "^1.2.0",
"ncp": "^2.0.0",
"request": "^2.81.0",
"uglify-es": "^3.0.20"
},
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions test/async-function.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

var jsonata = require('../jsonata');
var jsonata = require('../src/jsonata');
var request = require('request');
//var assert = require('assert');
var chai = require("chai");
Expand Down Expand Up @@ -159,4 +159,4 @@ describe('Handle chained functions that end in promises', function() {
return expect(jsonataPromise(expr, data, bindings)).to.be.rejected;
});

});
});
2 changes: 1 addition & 1 deletion test/implementation-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

"use strict";

var jsonata = require("../jsonata");
var jsonata = require("../src/jsonata");
var chai = require("chai");
var expect = chai.expect;

Expand Down
2 changes: 1 addition & 1 deletion test/parser-recovery.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

var jsonata = require('../jsonata');
var jsonata = require('../src/jsonata');
var assert = require('assert');
var chai = require("chai");
var expect = chai.expect;
Expand Down
4 changes: 2 additions & 2 deletions test/run-test-suite-async.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

var fs = require("fs");
var path = require("path");
var jsonata = require("../jsonata");
var jsonata = require("../src/jsonata");
var chai = require("chai");
var expect = chai.expect;
var chaiAsPromised = require("chai-as-promised");
Expand Down Expand Up @@ -198,4 +198,4 @@ function resolveDataset(datasets, testcase) {
return datasets[testcase.dataset];
}
throw new Error("Unable to find dataset "+testcase.dataset+" among known datasets, are you sure the datasets directory has a file named "+testcase.dataset+".json?");
}
}
4 changes: 2 additions & 2 deletions test/run-test-suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

var fs = require("fs");
var path = require("path");
var jsonata = require("../jsonata");
var jsonata = require("../src/jsonata");
var chai = require("chai");
var expect = chai.expect;

Expand Down Expand Up @@ -185,4 +185,4 @@ function resolveDataset(datasets, testcase) {
return datasets[testcase.dataset];
}
throw new Error("Unable to find dataset "+testcase.dataset+" among known datasets, are you sure the datasets directory has a file named "+testcase.dataset+".json?");
}
}

0 comments on commit 25b030f

Please sign in to comment.