Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build to clear node modules directory #1741

Merged
merged 3 commits into from
Feb 8, 2019
Merged

Update build to clear node modules directory #1741

merged 3 commits into from
Feb 8, 2019

Conversation

corbob
Copy link
Contributor

@corbob corbob commented Feb 1, 2019

PR Summary

  • Add removal of the node_modules directory on Clean task.
  • Move condition for restore to the build prerequisite.
    • This allows the restoring of node modules even if the folder exists.

The main benefit of this is it keeps the build process in invoke-build when new node modules are added as they were recently.

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • This PR is ready to merge and is not work in progress

Add removal of the node_modules directory on Clean task.

Move condition for restore to the build prerequisite.

This allows the restoring of node modules even if the folder exists.
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM

This causes bad things to happen when you're editing in vscode
(@types is locked until code exits)
Next best thing might be to npm prune (or maybe npm install?)
@corbob
Copy link
Contributor Author

corbob commented Feb 2, 2019

While I was doing more work with this, I noticed that node_modules wasn't being deleted when I cleaned. It turns out that vscode was holding the @types directory locked and not allowing it to be removed. A side effect of this was that you also couldn't restore modules. A happy medium I think is to do an npm prune to remove unused modules.

I've also included a slight change to package.json because npm install keeps adjusting the formatting 🤷‍♂️

@TylerLeonhardt TylerLeonhardt merged commit 190fa6a into PowerShell:master Feb 8, 2019
TylerLeonhardt pushed a commit to TylerLeonhardt/vscode-powershell that referenced this pull request Mar 18, 2019
* Update build to clear node modules

Add removal of the node_modules directory on Clean task.

Move condition for restore to the build prerequisite.

This allows the restoring of node modules even if the folder exists.

* Don't remove node_modules.
This causes bad things to happen when you're editing in vscode
(@types is locked until code exits)
Next best thing might be to npm prune (or maybe npm install?)

* npm install keeps putting these spaces in...
TylerLeonhardt pushed a commit that referenced this pull request Mar 20, 2019
* Update build to clear node modules

Add removal of the node_modules directory on Clean task.

Move condition for restore to the build prerequisite.

This allows the restoring of node modules even if the folder exists.

* Don't remove node_modules.
This causes bad things to happen when you're editing in vscode
(@types is locked until code exits)
Next best thing might be to npm prune (or maybe npm install?)

* npm install keeps putting these spaces in...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants