-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(package.json): force use yarn (#181)
Adds preinstall npm script that will encourage installing dependencies using yarn closes #36
- Loading branch information
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env node | ||
|
||
const setup = | ||
'\nhttps://github.com/ViacomInc/data-point/blob/master/CONTRIBUTING.md#setup\n' | ||
|
||
if (process.env.npm_execpath.indexOf('yarn') === -1) { | ||
console.error( | ||
'\x1b[41m', | ||
'Error: You must use yarn to install dependencies.\n\n', | ||
'For help setting up this project please vist:', | ||
'\x1b[0m', | ||
'\x1b[36m', | ||
'\n', | ||
setup | ||
) | ||
process.exit(1) | ||
} | ||
|
||
console.warn( | ||
'\x1b[36m%s\x1b[0m', | ||
'\nWe recommend using yarn for this project instead of npm.\n' + | ||
'\nTo learn more about why we use yarn visit:\n' + | ||
setup | ||
) |