amzn / style-dictionary

A build system for creating cross-platform styles.
https://styledictionary.com
Apache License 2.0
3.93k stars 557 forks source link

fix: only run postinstall scripts in non- prod-mode #1091

Closed jorenbroekema closed 9 months ago

jorenbroekema commented 9 months ago

patch-package and husky are both devDependencies, but they run on postinstall, which also applies when folks install their dependencies with npm install --production or npm install --omit=dev. prepare script instead of postinstall script is documented to only run when dev deps are installed, but this is currently bugged https://github.com/npm/cli/issues/4027

image

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.