package.json字段详解
生活随笔
收集整理的這篇文章主要介紹了
package.json字段详解
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
本文主要介紹常見package.json字段的含義。
{//發布時候的包名 @xxx是代表范圍包"name": "@xxx/package",//發布時候的包版本"version": "1.0.0",//包的描述"description": "xxx",//包私有,無法發布到npm"private":true,//包的關鍵字 用于npm搜索"keywords": ["xxx","xxx"],//包的主頁url"homepage":"",//issue的地址,也可是string"bugs":{"url":"","email":""},//許可證"license": "MIT",//作者信息"author":{"name":"","email":"","url":""},//貢獻者信息 array"contributors":[{"name":"","email":"","url":""}],//捐助信息 一般用不到"funding":{},//指定這個包被install時候有哪些文件 類似npmignore的反面"files":[],//包的入口地址"main": "dist/babel-form.min.js",//es6環境下入口文件"module":"",//yarn workspace monorepo"workspaces":[],//確保所有的package具有相同的版本"resolutions":{},//倉庫地址"repository": {"type": "git","url": "http://coding.jd.com/jmfe-babel/babel-form/"},//可通脫process.env.npm_package_config_port獲取到8080"config":{"port":"8080"},//發布設置"publishConfig": {//If present, will replace whatever registry is defined in the configuration when the package is about to be pushed to a remote location"registry": "http://registry.m.jd.com",//包的訪問權限"access": "public"},//腳本"scripts": {"start": "webpack-dev-server --open 'Google Chrome'"},//包的限制"engines": {"node": ">=13.14.0","yarn": ">=1.22.0"},//開發依賴"dependencies": {},//開發依賴"devDependencies": {},//相對依賴"peerDependencies": {} }參考
總結
以上是生活随笔為你收集整理的package.json字段详解的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 分享2022武体考研一战上岸学习心得
- 下一篇: 大数据索引