superset/superset-frontend/temporary_superset_ui/superset-ui/docs/debugging.md

26 lines
859 B
Markdown
Raw Normal View History

# Debug Superset plugins in Superset app
2019-09-19 03:07:24 -04:00
## Activate plugins for local development
2019-09-19 03:07:24 -04:00
1. First, make sure you have run `yarn` and `yarn build` in `superset-ui` or your own plugin repo.
2. Go to [sueprset-frontend](https://github.com/apache/incubator-superset/tree/master/superset-frontend),
use `npm link` to create a symlink of the plugin source code in `node_modules`:
2019-09-19 03:07:24 -04:00
```sh
cd incubator-superset/superset-frontend
# npm link ~/path/to/your/plugin
npm link ../../superset-ui/plugins/plugin-chart-word-cloud
```
2019-09-19 03:07:24 -04:00
3. Start developing with webpack dev server:
2019-09-19 03:07:24 -04:00
```sh
npm run dev-server
```
2019-09-19 03:07:24 -04:00
The dev server will automatically build from the source code under `path/to/your-plugin/src` and watch the changes.
2019-09-19 03:07:24 -04:00
## Deactivate plugins
2019-09-19 03:07:24 -04:00
To deactivate a plugin, simply run `npm install` in `incubator-superset/superset-frontend` again.