{
"name": "sell-inquiries",
"version": "1.0.0",
"description": "1.0.0",
"author": "1",
"private": true,
"main": "filename.js",
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js",
"uatbuild": "node build/uatbuild.js",
"commit": "node commit/index.js"
},
"dependencies": {
"animate.css": "^3.6.1",
"axios": "^0.16.2",
"babel-polyfill": "^6.26.0",
"element-ui": "2.3.9",
"vue": "^2.5.2",
"vue-cookie": "^1.1.4",
"vue-router": "^3.0.1",
"vue2-animate": "^2.0.0",
"vuex": "^3.0.1"
},
"devDependencies": {
"request": "^2.87.0",
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"webpack-merge": "^4.1.0"
},
"keywords": ["short", "relevant", "keywords", "for", "searching"],
"bin": {
"someTool": "./bin/someTool.js"
},
"homepage": "https://your-package.org",
"bugs": "https://github.com/user/repo/issues",
"repository": "github:user/repo",
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
复制代码
npm init:能够建立一个package.json文件css
name字段的含义不须要过多解释,就是npm包名。vue
几个规则:node
几个建议:webpack
一个name能够用scope来指定一个前缀,好比@myorg/mypackage,能够参考npm-scope。ios
{
"author": {//能够是一个对象,也能够用下面的字符串表示
"name": "Your Name",
"email": "you@example.com",
"url": "http://your-website.com"
},
"author": "Your Name <you@example.com> (http://your-website.com)"
}
复制代码
"bin": {
"someTool": "./bin/someTool.js"
}
scripts: {
start: './node_modules/someTool/someTool.js build'
}
// 简写为
scripts: {
start: 'someTool build'
}
复制代码