Skip to content

Bundle @dbux/cli with dbux-code extension #508

Open
@Domiii

Description

@Domiii

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 own node_modules) to a new folder (maybe call it dbux_bundled), outside the dbux folder (because else, yarn workspaces will hoist dependencies)
      • Theoretically, the glob library supports negative lookahead, something like this: somewhere!(/node_modules)/* (but needs testing!)
    • In that folder run yarn install
    • TODO:
      • Problem: make sure that @dbux/cli is also added to it's own node_modules folder
      • Problem: must not contain symlinks
    • Move that dbux_bundled folder back to dbux-code
    • (then proceed with packaging)
  • remove dependency from ProjectsManager
  • Instead, when starting, and dbux_bundled exists and node_modules does not exist, rename the dbux_bundled folder to node_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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestperformancePerformance of runtime analysis tools can be quite a nuisance.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions