Skip to content

Commit

Permalink
Import JSON directly
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Jun 2, 2018
1 parent 40bd312 commit 0a4ae33
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"scripts": {
"prebuild": "mkdir -p build/src",
"build": "npm run build:only",
"build:only": "tsc && cp package.json build/src/ && rollup -c",
"build:only": "tsc && rollup -c",
"postbuild": "uglifyjs build/vega-lite.js -cm --source-map content=build/vega-lite.js.map,filename=build/vega-lite.min.js.map -o build/vega-lite.min.js && npm run schema",
"build:examples": "npm run data && TZ=America/Los_Angeles scripts/build-examples.sh",
"build:examples-full": "TZ=America/Los_Angeles scripts/build-examples.sh 1",
Expand Down Expand Up @@ -66,7 +66,7 @@
"@types/chai": "^4.1.3",
"@types/d3": "^5.0.0",
"@types/highlight.js": "^9.12.3",
"@types/jest": "^22.2.3",
"@types/jest": "^23.0.0",
"@types/mkdirp": "^0.5.2",
"@types/node": "^9.0.0",
"@types/webdriverio": "^4.10.2",
Expand Down Expand Up @@ -103,15 +103,15 @@
"wdio-static-server-service": "^1.0.1",
"webdriverio": "^4.12.0",
"webpack": "^4.10.2",
"webpack-cli": "^2.1.4",
"webpack-cli": "^2.1.5",
"yaml-front-matter": "^4.0.0"
},
"dependencies": {
"@types/json-stable-stringify": "^1.0.32",
"json-stable-stringify": "^1.0.1",
"tslib": "^1.9.2",
"vega-event-selector": "^2.0.0",
"vega-typings": "^0.3.4",
"vega-typings": "^0.3.6",
"vega-util": "^1.7.0",
"yargs": "^11.0.0"
},
Expand Down
7 changes: 3 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import * as type from './type';
import * as util from './util';
import * as validate from './validate';

export {
version
} from './package.json';
import pkg from '../package.json';
const version = pkg.version;

export {aggregate, axis, bin, channel, compositeMark, config, data, datetime, encoding, facet, fieldDef, legend, mark, scale, sort, spec, stack, timeUnit, transform, type, util, validate};
export {aggregate, axis, bin, channel, compositeMark, config, data, datetime, encoding, facet, fieldDef, legend, mark, scale, sort, spec, stack, timeUnit, transform, type, util, validate, version};
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"target": "es5",
"module": "ES2015",
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"declaration": true,
Expand Down
3 changes: 0 additions & 3 deletions typings/json.d.ts

This file was deleted.

20 changes: 13 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@
version "9.12.3"
resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.3.tgz#b672cfaac25cbbc634a0fd92c515f66faa18dbca"

"@types/jest@^22.2.3":
version "22.2.3"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.2.3.tgz#0157c0316dc3722c43a7b71de3fdf3acbccef10d"
"@types/jest@^23.0.0":
version "23.0.0"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.0.0.tgz#760cac74f00bb9c3075587716d2b3b4435663bc0"

"@types/json-stable-stringify@^1.0.32":
version "1.0.32"
Expand Down Expand Up @@ -7883,14 +7883,20 @@ vega-transforms@^2.0.0:
vega-statistics "^1.2.1"
vega-util "^1.7.0"

vega-typings@*, vega-typings@^0.3.3, vega-typings@^0.3.4:
vega-typings@*, vega-typings@^0.3.3:
version "0.3.4"
resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.3.4.tgz#ea17c3c9c0114eadf658bcf04788fd603e0e83eb"

vega-typings@^0.2.16:
version "0.2.17"
resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.2.17.tgz#9f26775173b3d234d68dfe4c482037743786b8d2"

vega-typings@^0.3.6:
version "0.3.6"
resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.3.6.tgz#7d37e9259a978b622d8fb79d7a60537491099618"
dependencies:
vega-util "^1.7.0"

vega-util@1, vega-util@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/vega-util/-/vega-util-1.7.0.tgz#0ca0512bb8dcc6541165c34663d115d0712e0cf1"
Expand Down Expand Up @@ -8095,9 +8101,9 @@ webpack-addons@^1.1.5:
dependencies:
jscodeshift "^0.4.0"

webpack-cli@^2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-2.1.4.tgz#cab81e79249127384fb69b2fdfe2055f9c771b76"
webpack-cli@^2.1.5:
version "2.1.5"
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-2.1.5.tgz#3081fdeb2f205f0a54aa397986880b0c20a71f7a"
dependencies:
chalk "^2.4.1"
cross-spawn "^6.0.5"
Expand Down

0 comments on commit 0a4ae33

Please sign in to comment.