Skip to content

Commit

Permalink
🎉 chore: init project
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 9, 2023
1 parent 4f725e1 commit bb53f06
Show file tree
Hide file tree
Showing 12 changed files with 216 additions and 150 deletions.
2 changes: 1 addition & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { defineConfig } from 'dumi';

export default defineConfig({
themeConfig: {
name: '@arvinxu/npm-template',
name: 'zustand-utils',
},
});
1 change: 0 additions & 1 deletion .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from 'father';

export default defineConfig({
cjs: { output: 'lib' },
esm: { output: 'es' },
});
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: '报告Bug 🐛'
about: 报告 @arvinxu/npm-template 的 bug
about: 报告 zustand-utils 的 bug
title: '🐛[BUG]'
labels: '🐛 BUG'
assignees: ''
Expand Down Expand Up @@ -35,7 +35,7 @@ assignees: ''

### © 版本信息

- @arvinxu/npm-template 版本: [e.g. 1.0.0]
- zustand-utils 版本: [e.g. 1.0.0]
- 浏览器环境
- 开发环境 [e.g. mac OS]

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: '功能需求 ✨'
about: @arvinxu/npm-template 的需求或建议
about: zustand-utils 的需求或建议
title: '👑 [需求]'
labels: '👑 Feature'
assignees: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: '疑问或需要帮助 ❓'
about: @arvinxu/npm-template 使用的疑问或需要帮助
about: zustand-utils 使用的疑问或需要帮助
title: '🧐[问题]'
labels: '🧐 Question'
assignees: ''
Expand Down
72 changes: 0 additions & 72 deletions CHANGELOG.md

This file was deleted.

71 changes: 17 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @arvinxu/npm-template
# zustand-utils

[![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url] [![install size][npm-size]][npm-size-url]

Expand All @@ -9,7 +9,7 @@
<!-- gitpod url -->

[gitpod-badge]: https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod
[gitpod-url]: https://gitpod.io/#https://github.com/ant-design/@arvinxu/npm-template
[gitpod-url]: https://gitpod.io/#https://github.com/arvinxx/zustand-utils

<!-- umi url -->

Expand All @@ -18,67 +18,30 @@

<!-- npm url -->

[npm-image]: http://img.shields.io/npm/v/@arvinxu/npm-template.svg?style=flat-square&color=deepgreen&label=latest
[npm-url]: http://npmjs.org/package/@arvinxu/npm-template
[npm-size]: https://img.shields.io/bundlephobia/minzip/@arvinxu/npm-template?color=deepgreen&label=gizpped%20size&style=flat-square
[npm-size-url]: https://packagephobia.com/result?p=@arvinxu/npm-template
[npm-image]: http://img.shields.io/npm/v/zustand-utils.svg?style=flat-square&color=deepgreen&label=latest
[npm-url]: http://npmjs.org/package/zustand-utils
[npm-size]: https://img.shields.io/bundlephobia/minzip/zustand-utils?color=deepgreen&label=gizpped%20size&style=flat-square
[npm-size-url]: https://packagephobia.com/result?p=zustand-utils

<!-- coverage -->

[coverage]: https://codecov.io/gh/arvinxx/npm-template/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/arvinxx/npm-template/branch/master
[coverage]: https://codecov.io/gh/arvinxx/zustand-utils/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/arvinxx/zustand-utils/branch/master

<!-- Github CI -->

[test-ci]: https://github.com/arvinxx/npm-template/workflows/Test%20CI/badge.svg
[release-ci]: https://github.com/arvinxx/npm-template/workflows/Release%20CI/badge.svg
[test-ci-url]: https://github.com/arvinxx/npm-template/actions?query=workflow%3ATest%20CI
[release-ci-url]: https://github.com/arvinxx/npm-template/actions?query=workflow%3ARelease%20CI
[download-image]: https://img.shields.io/npm/dm/@arvinxu/npm-template.svg?style=flat-square
[download-url]: https://npmjs.org/package/@arvinxu/npm-template
[test-ci]: https://github.com/arvinxx/zustand-utils/workflows/Test%20CI/badge.svg
[release-ci]: https://github.com/arvinxx/zustand-utils/workflows/Release%20CI/badge.svg
[test-ci-url]: https://github.com/arvinxx/zustand-utils/actions?query=workflow%3ATest%20CI
[release-ci-url]: https://github.com/arvinxx/zustand-utils/actions?query=workflow%3ARelease%20CI
[download-image]: https://img.shields.io/npm/dm/zustand-utils.svg?style=flat-square
[download-url]: https://npmjs.org/package/zustand-utils

## 简介
## Introduction

这是一个开发 npm 项目的模板,工程框架选型如下:
## createContext

- 构建: father4
- 文档: dumi2
- CI: Github Action
- CD:
- 文档发布: 使用 vercel 自动化触发文档站构建;
- npm 发布: 使用 `semantic-release` 实现 npm 包的自动化发布;

## 快速上手

### 安装

推荐使用 `pnpm` 安装

```bash
pnpm i @arvinxu/npm-template -S
```

### 使用

基于该仓库模板可以快速创建一个 npm 包的工程化脚手架。

## 使用介绍

### Step1. 使用该模板创建一个新的仓库

点击右上角 `use this template` -> `create a new reposity` 按钮,创建一个新的仓库。

### Step2. 初始化项目信息

使用编辑器全局替换 `@arvinxu/npm-template` 为你的包名(例如 `antd-style`),执行 `pnpm i` 安装依赖。

### Step3. 开始开发

## 迭代记录

2022.12.17 - 基于蚂蚁研发技术栈配置完成最新的 npm 研发脚手架

详情:[CHANGELOG](./CHANGELOG.md)
A replacement createContext from zustand/context that is deprecated in the future.

## License

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
hero:
title: @arvinxu/npm-template
description: a npm develop template
title: zustand-utils
description: some utils for zustand
actions:
- text: 快速上手
link: /guide
Expand Down
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const config: Config.InitialOptions = {
'!src/.umi-production/**',
],
moduleNameMapper: {
'@arvinxu/npm-template/(.*)$': '<rootDir>/src/$1',
'@arvinxu/npm-template': '<rootDir>/src',
'zustand-utils/(.*)$': '<rootDir>/src/$1',
'zustand-utils': '<rootDir>/src',
'@/(.*)$': '<rootDir>/src/$1',
},
// if you require some es-module npm package, please uncomment below line and insert your package name
Expand Down
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
{
"name": "@arvinxu/npm-template",
"version": "1.4.0",
"description": "a npm develop template",
"name": "zustand-utils",
"version": "0.0.0",
"description": "some utils for zustand",
"keywords": [
"npm",
"template"
"zustand"
],
"homepage": "https://github.com/arvinxx/npm-template",
"homepage": "https://github.com/arvinxx/zustand-utils",
"bugs": {
"url": "https://github.com/arvinxx/npm-template/issues/new"
"url": "https://github.com/arvinxx/zustand-utils/issues/new"
},
"repository": {
"type": "git",
"url": "https://github.com/arvinxx/npm-template.git"
"url": "https://github.com/arvinxx/zustand-utils.git"
},
"license": "MIT",
"author": "arvinxx([email protected])",
"sideEffects": false,
"main": "lib/index.js",
"main": "es/index.js",
"module": "es/index.js",
"types": "lib/index.d.ts",
"types": "es/index.d.ts",
"files": [
"lib",
"es"
],
"scripts": {
Expand Down Expand Up @@ -91,7 +89,11 @@
"stylelint": "^14",
"ts-jest": "^29",
"ts-node": "^10",
"typescript": "^4"
"typescript": "^4",
"zustand": "^4"
},
"peerDependencies": {
"zustand": ">=4"
},
"publishConfig": {
"access": "public",
Expand Down
Loading

0 comments on commit bb53f06

Please sign in to comment.