This repository was archived by the owner on Jun 30, 2024. It is now read-only.
npm script postinstall -> prepare #203
Merged
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.
What
The npm
postinstall
script runs both on localnpm install
as well as after being installed as a dependency of someone else’s project. Theprepare
script only runs on localnpm install
(and before publishing). [npm-scripts]Why
vscode
is a devDependency, not a dependency, so if someone tries to install this package as a dependency of their own, the installation fails because./node_modules/vscode
does not exist.Wait, what?
I’m the maintainer of gatsby-remark-vscode, a plugin for the Gatsby static site system that lets blog authors harness VS Code’s syntax highlighting engine to style their code blocks. In the plugin’s v2, currently under development and released in alpha, I’m encouraging users to
npm install
any language and theme packages they need directly from GitHub, provided the source is licensed appropriately. One user (@janosh) tried this method on this package (yarn add styled-components/vscode-styled-components
), only to find that it can’t be installed since it tries unsuccessfully to set itself up for development/testing (andrewbranch/gatsby-remark-vscode#69).