cd into this foldernpm install to get our dependencies - both build time and run timenpm install -g gulp-cli to install gulp on your path. If you don't, you will not be able to use any gulp commands. Use gulp help for a list of the available commands for this project.If using vscode you should install the tslint extension to get nice lint warnings as you edit.
gulp buildgulp test or npm test This implicitly runs build.
Baseline test results are visible online here.gulp build-release Builds a minified copy of the repository into the dist folder.Documentation
gulp typedoc will regenerate the documentationnpm installing those dependencies sometimes fixes the build.The project is easiest to debug while running tests within vscode. Just add a vscode launch.json (inside the .vscode folder) similar to this one, and choose 'Launch' on the debugging pane.
In the general case, this library should be usable like the following:
import {createModel, createSvgExporter, createSqlDataSource} from "glacier";
const model = createModel();
const exporter = createSvgExporter(model);
const source = createSqlDataSource(model, "../path/to/db");
model.subscribe(state => console.log(exporter.export()));
The library is designed as a store which you can dispatch actions to, and hook up adapters (which can dispatch actions) and exporters (which can listen on state changes) on.
src/actions - actions creators - this is where functions which produce actions which can be dispatched to the store residesrc/reducers - state management - this is where actions become new parts of the state; specific reducers are responsible for specific actions which update specific portions of the statesrc/model - contains interfaces that describe the shape of statesrc/mapper - logic which maps our internal state into a Vega-Lite specification objectsrc/adapters - contains objects and interfaces specifying how to import data into the state (CSV, JSON, SQL, etc)src/exporters - contains objects and interfaces specify how to export a state into something useful (SVG, ZIP, etc)Generated using TypeDoc