[英]installing plugins like ESLint and Babel
Having some issues. 有一些问题。 I have installed Node + NPM, and finally got Live-server to work.
我已经安装了Node + NPM,最后使Live-server正常工作。 I am trying to install babel and ESLint with terminal.
我正在尝试使用终端安装babel和ESLint。 But the commands are not found when I try to check the versions.
但是当我尝试检查版本时找不到命令。
user-MBP:~ user$ which live-server /usr/local/bin/live-server user-MBP:~ user$ which babel user-MBP:~ user$ which eslint user-MBP:〜用户$所在的实时服务器/ usr / local / bin / live-server user-MBP:〜用户$所在的通行证user-MBP:〜user $其中eslint
do i need to install babel and eslint in the same /usr/local/bin/? 我需要在相同的/ usr / local / bin /目录中安装babel和eslint吗?
Babel and ESLint are NPM packages, meaning you install them with the NPM package manager. Babel和ESLint是NPM软件包,这意味着您可以使用NPM软件包管理器进行安装。 ESLint is straight forward, type:
ESLint简单明了,键入:
npm install eslint --save-dev
You may be able to install Babel the same way: 您可能可以通过以下方式安装Babel:
npm install babel
However Babel is a little more involved and might require some configuration, I recommend finding an article to walk you through it. 但是Babel涉及更多,可能需要一些配置,我建议您找到一篇文章逐步介绍。 This one looks reasonable: http://ccoenraets.github.io/es6-tutorial/setup-babel/
这看起来很合理: http : //ccoenraets.github.io/es6-tutorial/setup-babel/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.