.. | ||
.github | ||
packages | ||
.gitignore | ||
.npmrc | ||
.travis.yml | ||
buildAssets.js | ||
CHANGELOG.md | ||
commitlint.config.js | ||
lerna.json | ||
LICENSE | ||
package.json | ||
README.md |
@superset-ui/plugins-deckgl 🔌💡
Demo (Storybook)
Most recent release: https://apache-superset.github.io/superset-ui-plugins-deckgl/
Current master: https://superset-ui-plugins-deckgl.netlify.com
Packages
Package | Version |
---|---|
@superset-ui/legacy-preset-chart-deckgl |
Development
lerna and yarn are used to manage versions and dependencies between packages in this monorepo.
superset-ui/
lerna.json
package.json
...
packages/
package1/
package.json
...
src/
test/
...
lib/
esm/
...
...
Installation
- clone this repo
- have yarn install package dependencies and manage the symlinking between packages for you
git clone ...superset-ui-plugins-deckgl && cd superset-ui-plugins-deckgl
yarn install
yarn build
Activating plugins for local development
- Enable
npm link
for the package.
cd superset-ui
cd packages/superset-ui-chart
npm link
- Link the local package to
incubator-superset
.
cd incubator-superset
cd superset/assets
npm link @superset-ui/chart \# use package name in package.json, not directory name
- After npm link complete, update the import statements in Superset.
Instead of
import { xxx } from '@superset-ui/plugin-chart-horizon';
which will point to the transpiled code.
do refer to src
import { xxx } from '@superset-ui/plugin-chart-horizon/src'
- After that you can run
dev-server
as usual.
npm run dev-server
Now when you change the code in @superset-ui
, it will update the app immediately similar to code inside incubator-superset
.
Deactivating plugins for local development
-
Change the
import
statements back. -
Unlink the package from
incubator-superset
.
cd superset/assets
npm unlink @superset-ui/chart
Note: Quite often, npm link
mess up your node_modules
and the unlink
command above does not work correctly, making webpack build fails or other unexpected behaviors. If that happens, just delete your node_modules
and npm install
from scratch.
- Clean up global link.
cd superset-ui
cd packages/superset-ui-chart
npm unlink
Builds, linting, and testing
Each package defines its own build config, linting, and testing. You can have lerna run commands
across all packages using the syntax yarn run test
(or yarn run test:watch
for watch mode) from the root @superset-ui
directory.
Storybook
You can demo your changes by running the storybook demo locally with the following commands:
yarn install
yarn build
cd packages/superset-ui-plugins-deckgl-demo
yarn storybook:run
Alternatively, you can demo your changes by using the following command while in packages/superset-ui-plugins-deckgl-demo
:
yarn storybook
Committing
This repository follows conventional commits guideline for commit messages and has a commitlint
hook which will require you to have the valid commit message before committing. You can use npm run commit
to help you create a commit message.
Publishing
Prerequisite: You'll need an npmjs.com account that is part of the @superset-ui
organization.
- Make sure you're logged in to NPM from your shell. Run
npm login
if necessary. - To make the release, run
yarn run release
and follow the prompts.
License
Apache-2.0