UNPKG

nav-tab

Version:

A mobile touch-swappable navigation tabs component for Vue3.x

111 lines 6.59 kB
{ "name": "nav-tab", "version": "0.0.1-rc.2", "license": "MIT", "description": "A mobile touch-swappable navigation tabs component for Vue3.x", "author": "RexLee <lsl_jobs@163.com>", "private": false, "repository": { "type": "git", "url": "git+https://gitee.com/lisl4/nav-tab.git" }, "bugs": { "url": "https://gitee.com/lisl4/nav-tab/issues" }, "homepage": "https://gitee.com/lisl4/nav-tab", "publishConfig": { "registry": "https://registry.npmjs.org" }, "type": "module", "scripts": { "dev": "vite", "build": "vue-tsc -b && vite build --mode build", "typeCheck": "vue-tsc --noEmit", "preview": "vite preview" }, "keywords": [ "mobile", "Vue", "Vue3", "component", "plugin", "dependency", "swap", "nav", "navigation", "navigationBar", "tabs", "tabBar", "tab" ], "files": [ "dist", "compiled/types", "compiled/js/**/*.js", "compiled/js/**/*.js.map" ], "main": "dist/cjs/nav-tab.cjs", "module": "dist/es/nav-tab.js", "exports": { ".": { "import": { "types": "./compiled/types/index.d.ts", "default": "./dist/es/nav-tab.js" }, "require": "./dist/cjs/nav-tab.cjs" }, "./nav-tab.css": "./dist/nav-tab.css", "./package.json": "./package.json", "./compiled/js/**/*.js": "./compiled/js/**/*.js", "./compiled/js/**/*.js.map": "./compiled/js/**/*.js.map" }, "peerDependencies": { "vue": "^3.5.13" }, "devDependencies": { "@types/node": "^22.13.4", "@vitejs/plugin-vue": "^5.2.1", "@vue/tsconfig": "^0.7.0", "typescript": "~5.6.2", "vite": "^6.0.5", "vite-plugin-vue-devtools": "^7.7.2", "vue-tsc": "^2.2.0" }, "json-comments": { "tips": "Please install the JsonComments plugin to enable commenting functionality for JSON files, see: https://github.com/zhangfisher/json_comments_extension", "package.json": { "scripts.build": "执行构建任务。`vue-tsc -b` 命令:基于 tsconfig.json 配置,编译 ts 文件。`vite build` 命令:基于 vite.config.ts 配置,进行项目的打包构建;其中,添加一个额外的参数 `--mode build` ,该参数将作为「vite.config.ts 文件中 defineConfig 函数内的回调函数的参数」传入", "repository.directory": "如果项目在仓库的子目录中,请指定此字段", "main": "包的主入口文件,用于CommonJS模块规范", "module": "包的ES模块入口文件,用于ES模块规范", "style": "包的样式文件路径", "exports": "包的导出配置,指定不同环境下的入口文件。若不指定 exports 配置项,则 npm 默认会根据 main 和 module 字段确定包的入口点。优先级高于 main、module、types、style,这些都会被 exports 覆盖;高版本 npm 推荐使用 exports 进行导出配置。", "exports..": "默认导出,根据导入方式选择不同的入口文件", "peerDependencies": "对等依赖,表明该包依赖于特定版本的Vue,通常用于供外部应用导入的插件项目", "files": "发布时包含的文件或目录列表。默认还会发布:package.json、LICENSE、README.md、README.en.md", "keywords": "包的关键字,便于 npm 搜索", "private": "true:私有项目,需要向 npm 服务付费才能正常发布,否则建议设为 false ,向全网公开", "scripts": "npm 脚本命令,用于执行各种开发和构建任务", "description": "包的简短描述,有助于其他开发者了解该包的用途", "repository": "包的代码仓库信息。directory 属性(可选):`\"directory\": \"path/to/package\"` // 如果你的包位于仓库的子目录中,可以指定该字段。", "exports../package.json": "允许相对路径访问 package.json 文件", "devDependencies": "开发依赖,仅在开发过程中需要的依赖项", "json-comments": "VSCode 插件 JsonComments,用于在 JSON 编辑器中显式配置项的注释信息。", "version": "包的版本号,遵循语义化版本规范。【#警告】:每次发布时,version 不能与上次发布的一样。", "name": "包的名称,用于在npm上唯一标识该包。【#警告】:1、若带@符号,则表示私有仓库,必须先付费。2、不能有「斜杠」等不符合命名规范的特殊符号。", "author": "包的作者信息,包含作者姓名和邮箱", "scripts.preview": "预览构建后的项目", "scripts.typeCheck": "进行类型检查,但不生成输出文件", "types": "types 字段: 指定主类型定义文件的路径。TypeScript 编译器会根据这个路径查找类型定义文件。.d.ts.map 文件: 通常与 .d.ts 文件一起生成,用于调试和类型检查时提供源映射信息。TypeScript 编译器会自动处理这些文件的关联,不需要在 package.json 中单独指定。", "repository.url": "让包管理器(如npm、yarn)更明确这是一个Git仓库地址。因为URL格式多样,加上 git+ 可避免包管理器把它误认成普通HTTP链接。 例如,在安装依赖时,包管理器会依据这个带 git+ 前缀的URL,用Git工具克隆仓库代码。即使没有 \"type\": \"git\" ,有 git+ 前缀也能让包管理器知道要通过Git协议获取代码。", "repository.type": "仓库类型", "bugs": "包的问题反馈地址", "homepage": "包的主页地址", "publishConfig": "发布配置,指定 npm 包发布的目标注册表地址。当你使用 npm publish 命令将包发布到 npm 时,publishConfig 会覆盖默认配置。publishConfig 还可以包含其他配置项,例如 tag(指定发布时的标签)、access(指定包的访问级别,如 public 或 restricted)等。通过 publishConfig,你可以灵活控制包的发布行为。", "publishConfig.registry": "https://registry.npmjs.org 是 npm 官方的注册表地址,意味着这个包会被发布到 npm 官方仓库。", "license": "开源许可协议", "exports...import.default": "源码入口(推荐:开发环境):./src/index.ts 。当前项目作为一个独立的依赖库供外部使用,构建前,要将项目入口设为 ./dist/es/nav-tab.js 。构建后项目入口(推荐:生产环境 / 发布到 npm远程仓库):./dist/es/nav-tab.js 。TypeScript 编译后项目入口:./compiled/js/index.js", "exports../nav-tab.css": "允许相对路径访问样式文件" } } }