decentraland / editor-sdk7

VSCode extension for Decentraland SDK7 projects
https://marketplace.visualstudio.com/items?itemName=DecentralandFoundation.decentraland-sdk7
MIT License
3 stars 5 forks source link

feat: cache node modules #113

Closed cazala closed 1 month ago

cazala commented 1 month ago

This PR adds two steps to the installation of the extension dependencies:

  1. First, it restores the node_modules from the global cache (if it exists) by copying the node_modules from {globalStorage}/.cache/node_modules into {extensionPath}/node_modules
  2. Second, it installs the extension's dependencies by running npm install
  3. Third, it copies the freshly installed node_modules into the global cache at {globalStorage}/.cache/node_modules to keep the cache updated.

This makes the installation process faster for future version because it doesn't run the npm install on an empty node_modules but instead it keeps the ones from the previous version.

github-actions[bot] commented 1 month ago

Test this pull request