forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checks if babel is installed globally and displays correct cli messag…
…e - fixes babel#5228
- Loading branch information
1 parent
283d9cb
commit 0ee810c
Showing
2 changed files
with
8 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
#!/usr/bin/env node | ||
import isGlobal from "is-global" | ||
|
||
const globalMessage = isGlobal() ? ' -g' : ''; | ||
|
||
console.error("You have mistakenly installed the `babel` package, which is a no-op in Babel 6.\n" + | ||
"Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package.\n" + | ||
"\n" + | ||
" npm uninstall babel\n" + | ||
" npm install babel-cli\n" + | ||
" npm uninstall" + globalMessage + " babel\n" + | ||
" npm install" + globalMessage + " babel-cli\n" + | ||
"\n" + | ||
"See http://babeljs.io/docs/usage/cli/ for setup instructions."); | ||
process.exit(1); |
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