继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

npm的使用

android开发学习视频
关注TA
已关注
手记 304
粉丝 52
获赞 322

使用npm之前先安装node.js,因为node.js已经集成了npm
1.测试npm版本    $ npm -v
2.升级npm版本    $ npm install npm -g
3.安装模块           $ npm install <Moudle Name> -g
4.查看所有模块    $ npm list -g
5.只输出两层依赖关系包$ npm list --depath=1 -g
6.查看模块版本号    $ npm list <Moudle Name>
7.卸载模块               $ npm uninstall <Moudle Name>
8.更新模块   $ npm update <Moudle Name>
9.搜索模块   $npm search <Moudle Name>
10.注册用户   $npm adduser
11.发布模块 $npm publish
12.清空npm本地缓存 $npm cache clear
13.安装淘宝镜像        $npm install -g cnpm --registry=https://registry.npm.taobao.org
14.安装运行时依赖包 $npm install --save -prod
15.安装开发时依赖包 $npm install --save -dev
16.执行打包任务    $npm run build
17.执行生成dist目录文件的命令 $npm run dist
18.运行开发测试     $npm run dev
19.运行测试    $npm run test

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP