美文网首页
从零搭建一个React/Vue项目

从零搭建一个React/Vue项目

作者: leonaxiong | 来源:发表于2017-10-12 12:53 被阅读0次

Prepare node.js,npm & webpack

  1. check
    whether you have installed node.js on this computer and which version
node -v
npm -v
  1. install
    download node.js from https://nodejs.org/en/, npm is included in.
  2. set CLASSPATH
    如果之前安装过,会有之前的环境变量设置,检查下是否一致,会影响到后面的webpack全局安装。
  3. install webpack
npm install webpack -g

Create React App

npm install -g create-react-app
create-react-app hello-world
cd hello-world
npm run start

Create Vue-Cli

npm install -g vue-cli
vue init webpack projectname
?Install vue-router? Yes
? Use ESLint to lint your code? No
? Setup unit tests with Karma + Mocha? Yes
? Setup e2e tests with Nightwatch? Yes
cd projectname
npm install
npm run dev

相关文章

网友评论

      本文标题:从零搭建一个React/Vue项目

      本文链接:https://www.haomeiwen.com/subject/pcunyxtx.html