1 Star 0 Fork 0

nhy / utils

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

如何使用

npm i qn-utils

如何协作开发

鉴于项目驱动于 pnpm 的 workspace 功能,您需要以下安装步骤

  1. 先安装 pnpm ,当前项目禁掉 npm,其他命令使用 pnpm
npm install -g pnpm
  1. -w root workspace 安装依赖
pnpm install -w

如果 node 版本太低,推荐升级至 14+

这里也提供了低版本不便于升级的解决方案:所有命令前加

npx -p node@14

过渡 pnpm 工具

npm 命令 pnpm 等效
npm install pnpm install
npm i pnpm add
npm run pnpm /pnpm run
npm install -dev pnpm install -D

另外列举两个常用命令~

只操作某一个包:
 pnpm <cmd> --filter pkgName // eg:@webb/utils
本地测试某一个包:

先在当前目录 build

 pnpm build --filter pkgName

在目标工作空间运行命令链接,只需要运行一次

pnpm link dir  // dir 可以是D:\*..*\webb\packages\utils

更用法直达 pnpm 官网

搭建进程

(~-11.28)
  • pnpm 替换 lerna+yarn
  • 支持 TS
  • 支持 ES6+新特性
  • CMJ + ESM 包
  • UMD 包(验证中)
  • [ç] 支持单元测试(暂用 js, 不做测试函数的类型校验)
  • 写更多的方法 + 测试用例 (1/5)
✨11.29-12.05
  • 写更多的方法 + 测试用例 (1/5)
  • 整理发布步骤
✨12.01- ~
  • 在项目中应用
MIT License Copyright (c) 2022 nhy 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.

简介

面向 前端/node 的工具集合 展开 收起
TypeScript 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/nhying/utils.git
git@gitee.com:nhying/utils.git
nhying
utils
utils
master

搜索帮助