Closed
Description
What / Why
Certain packages are used almost exclusively for development. Eg. typescript
, tslint
etc. It's usually a mistake to add them as normal dependencies.
I suggest to add field "preferDev": boolean (with default false
) to package.json. User can't install preferDev
package without specyfing --production
flag.
When
- On adding new package
Where
- npm/cli
How
Current Behavior
Packages are installed as dependencies
by default.
Expected Behavior
To choose:
- Warn user about installing
preferDev
package as production one. - Ask for confirmation if installing
preferDev
package as production one - Require
--production
flag explicitly set to installpreferDev
package as production one