摘要: 视频 百度npm搜到淘宝npm镜像 npm install -g cnpm --registry=//registry.npm.taobao.org 这样既不影响npm访问美国服务器,又不影响cnpm访问中国服务器 阅读全文
posted @ 2023-02-06 03:08 垂序葎草 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 视频 npm的命令 npm -v 查看npm的版本 npm version 查看所有模块的版本 npm search 包名 搜索包 npm install / i 包名 安装包 npm remove / r 包名 删除包 npm install 包名 --save 安装包并添加到依赖中 ***** 阅读全文
posted @ 2023-02-06 02:57 垂序葎草 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 视频 json文件不能写注释 阅读全文
posted @ 2023-02-06 02:39 垂序葎草 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 视频 #05.module.js var hello = require("./helloModule"); /* exports 和 module.exports - 通过exports只能使用.的方式来向外暴露内部变量 exports.xxx = xxx - 而module.exports既可以 阅读全文
posted @ 2023-02-06 02:27 垂序葎草 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 视频 #math.js /* 定义一个模块 math - 在该模块中提供两个方法 add(a , b); //求两个数的和 mul(a , b); //求两个数的积 */ module.exports.add = function (a , b) { return a+b; }; module.ex 阅读全文
posted @ 2023-02-06 01:07 垂序葎草 阅读(125) 评论(0) 推荐(0) 编辑