1. 去官网https://nodejs.org/en/download/ 下载 安装(傻瓜式安装)

  2. 打开终端 cmd : 执行 node -v  ,如果出现版本号,证明安装node成功 ,跟安装python雷同

    node -v 
  3. 下载完node之后,会自带包管理器 npm,好比 是python中 pip3包管理器。pip3 install xxx

  4. 使用npm

    1. 1.要初始化npm的项目 :

      npm init --yes 自动生成一个package.json文件

      ```javascript
      {
      
          "name": "vue_lesson",
      
          "version": "1.0.0",
      
          "description": "这是我的vue的第一个项目",
      
          "main": "index.js",
      
          "scripts": {
      
            "test": "echo "Error: no test specified" && exit 1"
      
          },
      
          "author": "mjj",
      
          "license": "ISC",
      
          "dependencies": {
      
            "vue": "^2.5.16"
      
          }
      
        }
      
      ```

      2.下载依赖包

      npm install vue --save
      npm install jquery --save

      3.卸载包 npm uninstall vue --save

      4.下载所有的依赖包 npm install

posted on 2018-11-15 21:56  天马行宇  阅读(80)  评论(0编辑  收藏  举报