Add jlab_link
script to link local changes into development Jupyterlab
#1309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #1299 by adding
yarn jlab_link
, which usesyarn link
to force Jupyterlab to pull@finos-perspective*
packages from a local development directory instead of from NPM. As ofv0.6.0
, developers are no longer able to see their local directory changes to packages other than@perspective-jupyterlab
in Jupyterlab, as Jupyterlab is pulling these packages from NPM duringjupyter lab build
. We used to inline the entirety of Perspective into the Jupyterlab plugin, but this is inefficient for dists and not a great development practice.Using
yarn jlab_link
, developers are now able to see their local changes inside the Jupyterlab plugin, and the dist has not been changed to inline Perspective. Instead, developers shouldyarn link
all Perspective packages inside thepackages
folder, and then runyarn jlab_link
, which will find the Jupyterlab path, add the linked packages to Jupyterlab, and trigger a build which will incorporate the sym-linked Perspective packages instead of attempting to find them from NPM:We can see that local changes (the console.log statements) are showing up as part of the Jupyterlab plugin.