1 Star 0 Fork 0

爱做梦的奋斗青年 / mark-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

项目技术栈

搭建组件库

创建仓库

pnpm init
type nul > pnpm-workspace.yaml
md packages

type nul > .npmrc
echo shamefully-hoist = true > .npmrc

type nul > .gitignore

## 全局安装
pnpm install vue -w
pnpm install typescript -w -D
pnpm install vue-tsc -w -D
pnpm install @vitejs/plugin-vue vite -D -w
pnpm install sass -D -w
pnpm install minimist esbuild -w -D
## 添加TS配置文件tsconfig.json
pnpm tsc --init

## 创建子项目
pnpm create vite components --- --template vue-ts
pnpm uninstall vue
pnpm uninstall @vitejs/plugin-vue -D
pnpm uninstall vite -D
pnpm uninstall typescript -D
pnpm i @types/node --save-dev
## 添加依赖
pnpm install @haijunit/mark-ui@* --filter @haijunit/web1

技巧

// 文件的引入 得益于:tsconfig.json
import { isObject } from '@manage/shared/utils';

// css的引入 得益于:sass
@import "@manage/shared/styles/index.scss";

配置

## 安装eslint格式化统一代码(VsCode编辑器安装Volar、ESlint插件)
pnpm install eslint eslint-plugin-vue @typescript-eslint/parser @typescript-eslint/eslint-plugin -D -w

## 安装prettier
pnpm install prettier eslint-config-prettier eslint-plugin-prettier -D -w

## release工作流程
pnpm install @changesets/cli -D -w

npm install rimraf -g

verdaccio搭建npm私有仓库

## 全局安装 verdaccio
npm i -g verdaccio
## 在终端中输入 verdaccio 命令启动 verdaccio:
verdaccio
## 访问:http://localhost:4873/

## 创建用户
npm adduser --registry  http://localhost:4873
## 发布 npm 包到私有仓库
npm publish --registry http://localhost:4873/

## 使用私有仓库npm包
pnpm create vite demo
npm set registry http://localhost:4873
pnpm add @haijunit/components

## FAQ
## Could not find a declaration file for module '@haijunit/components'.
echo declare module '*' >> shims-vue-d.ts
MIT License Copyright (c) 2024 爱做梦的奋斗青年 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

搭建个人的web相关的知识库,包括:导航页 、技术记录 3、书籍阅读 、自我冥想 、组件库 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/haijunit/mark-web.git
git@gitee.com:haijunit/mark-web.git
haijunit
mark-web
mark-web
master

搜索帮助