Skip to content

BurtHarris/yarn-required

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yarn-required

Require a package.json script be run from yarn

When taking advantage of advanced yarn features like workspaces, building using npm can generate hard-to-understand errors. You can avoid this by inserting this package.json's install script, and anyone using npm install to build the package will get a clearer message.

This mainly makes sense if you are using yarn's cool workspaces feature. The example below makes that assumption...

Installation :

yarn add -W yarn-required

Then edit your workspace-level package.json to use this command before any installation steps are run...

...
"scripts": {
    "install": "yarn-required"
...

About

Require a package.json script be run from yarn

Resources

License

Stars

Watchers

Forks

Packages

No packages published