Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perspective config #644

Merged
merged 8 commits into from
Jul 8, 2019
Merged

Perspective config #644

merged 8 commits into from
Jul 8, 2019

Conversation

texodus
Copy link
Member

@texodus texodus commented Jul 3, 2019

Adds global config feature to perspective. Config can be defined in 2 ways:

  1. In a perspective.config.js, perspective.config.json or in your package.json under the "perspective" key (ala babel, jest, webpack, etc). The webpack plugin and node runtime will both auto-include this file when discovered so the client and server are consistent.
  2. As an argument to perspective.worker().

Currently, only type-level default aggregate and filter operator are configurable as tests of the feature itself.

Example perspective.config.js:

module.exports = {
    types: {
        string: {
            filter_operator: ">=",
            aggregate: "distinct count"
        }
    }
};

@texodus texodus merged commit 36473b7 into master Jul 8, 2019
@texodus texodus deleted the perspective-config branch July 8, 2019 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants