次要内容:介绍如何应用npm装置应用git/github下的前端我的项目
本流程仅实用于前端, js我的项目
以Acorn为例
github: https://github.com/acornjs/acorn
- 确认已装置node.js和npm
因为国内网路的问题很多时候装置都不胜利,在此应用代理:
- 关上cmd
- 输出npm install -g cnpm --registry=https://registry.npm.taobao.org
- 装置我的项目,cmd : cnpm install -g acorn
- 持续在cmd里输出 run test
- 这时会发现报错,是因为短少反对的库
- 这时候咱们就能够依照提醒短少的库进行顺次装置,这里提醒短少"rollup-plugin-buble"
- cmd 输出: cnpm install --save-dev rollup-plugin-buble
- 装置胜利后再次测试 回到步骤4
- 再次提醒短少库rollup
- cmd 输出: cnpm install rollup
- 直到提醒测试通过
- 咱们进入node.js 输出 node
- 而后开始咱们的测试就能够啦