v2.0.0-alpha.4 – Improved Release Output
Pre-release
Pre-release
kanitw
released this
01 Mar 22:45
·
5390 commits
to master
since this release
We now ship both ts and js files to npm packages.
All compiled js files, both bundled (vega-lite.js
and vega-lite.min.js
) and TS compiler's output, are under build/
.
If you wish to do local import of a particular file, please import from build/src
from dependent projects (both JS and TS).
For example, to import Channel
, you can import like this (diff showing traditional import)
+import {Channel} from 'vega-lite/build/src/channel';
-import {Channel} from 'vega-lite/src/channel';
For dependent TS projects, this approach has multiple benefits:
-
Users can do
npm link vega-lite
in a dependent project. TS compiler will no longer import TS files rather than JS files from linked project. (.ts
files have high precendence than.js
files.) -
Source map will still work when users try to debug lines in Vega-Lite.