1.创建 package.json
npm init 或者 npm init --yes
2.package.json文件
{
"name": "demo3.2",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"md5": "^2.3.0", --(安装模块的时候,npm install md5 --save 这个后面加上--save 就可以把内容写入到这里)
"silly-datetime": "^0.1.2"
}
}
网友评论