@superset-viz-plugins/core v0.1.2
superset-viz-plugins
Project Overview
Template repository
This repository is a template repository that enables you to create a custom set of plugins that by Github workflow process generate a ready to load docker image bundled with the plugins
Monorepo
This repository is using a monorepo strategy which lets us have one source of truth for many projects. All the projects hosted here rely on the same tools.
Artifacts Deployment
Npm pacakges are deployed here
Docker Image is deployed here
Project Stack
Project Setup
To work with this repository you'll need to install yarn and lerna globally on your machine.
Installing yarn:
brew install yarnInstalling lerna:
yarn global add lernaCommands
Bootstrap Project
To link all packages together and install all dependencies, you should use
lerna bootstrapThis will:
- Install all external dependencies
- Symlink together all the Lerna packages that are dependencies of each other.
- Run prepublish in all bootstrapped packages.
With the help of yarn workspaces, any external dependency will be installed in the root and linked to all packages instead of installed in every package on it's own.
Adding workspace dependencies
yarn workspace <workspace_name> <command>This will run the chosen Yarn command in the selected workspace.
Example:
yarn workspace @maf/b2b add @testing-library/react -DThis will add @testing-library/react as devDependency in your packages/b2b/package.json.
This command can be used to run any script you'd like on a specific workspace: test, dist and every script defined in the workspace package.json.
Adding root devDependencies
yarn add @babel/cli -DWThis will install @babel/cli as a devDependency on the monorepo root. the -D is for devDependency, the -W is to install in the root.
Running scripts on all workspaces
To run scripts on all workspaces, we use lerna.
All you need to do is run lerna run and the script you want.
This command will run the test script defined in every workspace
lerna run testRunning scripts on workspaces changed
lerna run test --since masterThis will run test script defined in the workspaces that changed from master branch.
Print all changes in workspaces
lerna diffThis will print all the changes from master by commits.
Print which packages have been changed in workspace
lerna changedThis will print all packages changed from master by name.
Deployment
lerna publish from-packageThis will publish the packages that not found at the registy with the latest version.