Skip to content

Commit

Permalink
chore: rename to npm-lib-template
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmagic committed Jun 15, 2024
1 parent f96d8b0 commit 2678d1e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/sonofmagic/npm-lib-rollup-template/discussions
url: https://github.com/sonofmagic/npm-lib-template/discussions
about: Suggest new features for consideration
# - name: Discord Chat
# url: https://chat.vuejs.org
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# npm-lib-rollup-template
# npm-lib-template

[![codecov](https://codecov.io/gh/sonofmagic/npm-lib-rollup-template/branch/main/graph/badge.svg?token=zn05qXYznt)](https://codecov.io/gh/sonofmagic/npm-lib-rollup-template)
[![codecov](https://codecov.io/gh/sonofmagic/npm-lib-template/branch/main/graph/badge.svg?token=zn05qXYznt)](https://codecov.io/gh/sonofmagic/npm-lib-template)

[icebreaker](https://github.com/sonofmagic) 编写的一个 `npm` 包的一个模板

- 使用 `tsup` 打包 , `rollup` 打包版本在 [rollup](https://github.com/sonofmagic/npm-lib-rollup-template/tree/rollup) 分支 (兼容 `tsc`)
- 使用 `tsup` 打包 , `rollup` 打包版本在 [rollup](https://github.com/sonofmagic/npm-lib-template/tree/rollup) 分支 (兼容 `tsc`)
- 使用 `vitest` 作为单元测试框架
- 使用 `eslint` 来规范代码风格
- 输出 `dist` -> `cjs`,`esm` and `.d.ts`
Expand All @@ -20,7 +20,7 @@

执行 `npm run init:rename`

作用为替换 `package.json` 中默认包含的所有名称为 `npm-lib-rollup-template` 的字段
作用为替换 `package.json` 中默认包含的所有名称为 `npm-lib-template` 的字段

默认替换为新建代码仓库的文件夹名称!

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"description": "npm-lib-template",
"author": "SonOfMagic <[email protected]>",
"license": "MIT",
"homepage": "https://github.com/sonofmagic/npm-lib-rollup-template#readme",
"homepage": "https://github.com/sonofmagic/npm-lib-template#readme",
"repository": {
"type": "git",
"url": "https://github.com/sonofmagic/npm-lib-rollup-template.git"
"url": "https://github.com/sonofmagic/npm-lib-template.git"
},
"bugs": {
"url": "https://github.com/sonofmagic/npm-lib-rollup-template/issues"
"url": "https://github.com/sonofmagic/npm-lib-template/issues"
},
"keywords": [],
"exports": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/init/rename.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ function doReplace(ref, name) {
const len = paths.length
switch (len) {
case 1: {
pkg[paths[0]] = pkg[paths[0]].replaceAll('npm-lib-rollup-template', name)
pkg[paths[0]] = pkg[paths[0]].replaceAll('npm-lib-template', name)
break
}
case 2: {
pkg[paths[0]][paths[1]] = pkg[paths[0]][paths[1]].replaceAll(
'npm-lib-rollup-template',
'npm-lib-template',
name,
)
break
Expand Down

0 comments on commit 2678d1e

Please sign in to comment.