Open
Description
We currently install @dbux/cli
in ProjectsManager.installModules
, which is called from installDbuxDependencies
right during dbux-code
intialization.
Problem: This takes a long time for a first-time user.
Sln: We can save the user the time by bundling it with the extension (about 5 MB after compression).
NOTE: When bundling the extension, it bundles the entire dbux-code
folder minus everything from .vscodeignore
- in
dbux-code/package.json
->package-no-build
add an extra step to bundle@dbux/cli
:- For that, copy all of
@dbux/cli
(without its ownnode_modules
) to a new folder (maybe call itdbux_bundled
), outside thedbux
folder (because else, yarn workspaces will hoist dependencies)- Theoretically, the
glob
library supports negative lookahead, something like this:somewhere!(/node_modules)/*
(but needs testing!)
- Theoretically, the
- In that folder run
yarn install
- TODO:
- Problem: make sure that
@dbux/cli
is also added to it's ownnode_modules
folder - Problem: must not contain symlinks
- Problem: make sure that
- Move that
dbux_bundled
folder back todbux-code
- (then proceed with packaging)
- For that, copy all of
- remove dependency from
ProjectsManager
- Instead, when starting, and
dbux_bundled
exists andnode_modules
does not exist, rename thedbux_bundled
folder tonode_modules
(the latter is ignored by.vscodeignore
) - Don't forget to test this new approach
- NOTE: use
production
build to avoid it using local dependencies and skipping install process - Stop dev-mode
npm watch
- Run production build (with or without watch) instead
yarn run code:install
- NOTE: use