Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
novlan1 committed Dec 14, 2024
1 parent bf8bbef commit 7fc9472
Show file tree
Hide file tree
Showing 92 changed files with 319 additions and 187 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
style="margin-bottom: 20px;margin-top: 20px;"
/>
</div>
<!-- 复制到 docs 时,去掉 ”详细文档“ 那一节 -->

<p align="center">
<img src="https://img.shields.io/travis/com/novlan1/t-comm">
Expand All @@ -19,7 +20,7 @@

### 介绍

`t-comm` 是一个丰富、易用的工具库
`t-comm` 是一个专业、稳定、纯粹的工具库

### 如何使用

Expand Down
2 changes: 1 addition & 1 deletion bin/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function publishWithBash({
port,
}) {
const publishBash = require('path').resolve(__dirname, './publish.sh');
const command = `sh ${publishBash} ${source} ${target} ${name} ${password} ${port}`;
const command = `sh ${publishBash} ${source} ${target} ${name} "${password}" ${port}`;

execSync(command, {
cwd: process.cwd(),
Expand Down
8 changes: 6 additions & 2 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const changeLogSidebar = SHOW_CHANGE_LOG ? [


module.exports = {
title: 't-comm',
description: '丰富易用的工具库',
title: 'T Comm',
description: '专业、稳定、纯粹的工具库',
base: process.env.PUBLISH_PATH || '/t-comm/',
head: [
[
Expand Down Expand Up @@ -46,6 +46,10 @@ module.exports = {
text: 'Press UI',
link: 'https://novlan1.github.io/press-ui/',
},
{
text: 'Plugin Light',
link: 'https://novlan1.github.io/plugin-light/',
},
],
sidebar: [
{
Expand Down
12 changes: 12 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# 更新日志

### [1.3.126](https://github.com/novlan1/t-comm/compare/v1.3.125...v1.3.126) (2024-12-13)


### Tests ✅

* update test cases ([1c4ddf7](https://github.com/novlan1/t-comm/commit/1c4ddf7b7c6f79dbc4c127da1310120c5e4ceae5))


### Features 🎉

* **publish-ci:** 支持特殊符号的密码 ([abb0757](https://github.com/novlan1/t-comm/commit/abb07573a3585e88d3be9c83aba55e748f587dc0))

### [1.3.125](https://github.com/novlan1/t-comm/compare/v1.3.124...v1.3.125) (2024-12-13)


Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

<div align="center">
<img
src="https://mike-1255355338.cos.ap-guangzhou.myqcloud.com/article/2023/10/own_mike_5489135b5a3b9258d8.png"
src="https://mike-1255355338.cos.ap-guangzhou.myqcloud.com/press%2Fimg%2Fown_mike_5489135b5a3b9258d8.gif"
width="120"
style="margin-bottom: 20px;margin-top: 20px;"
/>
</div>
<!-- 复制到 docs 时,去掉 ”详细文档“ 那一节 -->

<p align="center">
<img src="https://img.shields.io/travis/com/novlan1/t-comm">
Expand All @@ -19,7 +20,7 @@

### 介绍

`t-comm` 是一个丰富、易用的工具库
`t-comm` 是一个专业、稳定、纯粹的工具库

### 如何使用

Expand Down Expand Up @@ -52,4 +53,3 @@ timeStampFormat(stamp, 'yyyy-MM-dd hh:mm:ss');
// 2020-11-27 08:23:24
```


3 changes: 1 addition & 2 deletions docs/zh/ast.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { parseReplaceConfig, replaceDependencies } from 't-comm';

// or

import { parseReplaceConfig, replaceDependencies} from 't-comm/lib/ast/index';
```

Expand Down
3 changes: 1 addition & 2 deletions docs/zh/base/function.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { parseFunction, cached } from 't-comm';

// or

import { parseFunction, cached} from 't-comm/lib/base/function/index';
```

Expand Down
3 changes: 1 addition & 2 deletions docs/zh/base/list.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import {
Expand All @@ -17,7 +17,6 @@ import {
} from 't-comm';

// or

import {
flat,
flatten,
Expand Down
3 changes: 1 addition & 2 deletions docs/zh/base/number.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import {
Expand All @@ -16,7 +16,6 @@ import {
} from 't-comm';

// or

import {
NUMBER_CHI_MAP,
getUnitPreviousRatio,
Expand Down
3 changes: 1 addition & 2 deletions docs/zh/base/object.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { toHumpObj, extend } from 't-comm';

// or

import { toHumpObj, extend} from 't-comm/lib/base/object/index';
```

Expand Down
3 changes: 1 addition & 2 deletions docs/zh/base/regexp.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { getMatchListFromReg, getPreReleaseTag } from 't-comm';

// or

import { getMatchListFromReg, getPreReleaseTag} from 't-comm/lib/base/regexp/index';
```

Expand Down
35 changes: 31 additions & 4 deletions docs/zh/base/string.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import {
Expand All @@ -11,12 +11,12 @@ import {
capitalize,
titleize,
lowerInitial,
pascalCase,
toUnicodeAt,
toUnicode
} from 't-comm';

// or

import {
checkStringLength,
replaceAllPolyfill,
Expand All @@ -25,6 +25,7 @@ import {
capitalize,
titleize,
lowerInitial,
pascalCase,
toUnicodeAt,
toUnicode
} from 't-comm/lib/base/string/index';
Expand Down Expand Up @@ -71,17 +72,18 @@ replaceAllPolyfill()
```
<a name="camelize"></a>

## `camelize(str)`
## `camelize(str, handleSnake)`


**描述**:<p>横线转驼峰命名</p>
**描述**:<p>横线转驼峰命名,如果第一个字符是字母,则不处理。</p>

**参数**


| 参数名 | 类型 | 描述 |
| --- | --- | --- |
| str | <code>string</code> | <p>输入字符串</p> |
| handleSnake | <code>boolean</code> | <p>是否处理下划线,默认不处理</p> |

**返回**: <code>string</code><br>

Expand Down Expand Up @@ -198,6 +200,31 @@ lowerInitial('GroupId')

// groupId
```
<a name="pascalCase"></a>

## `pascalCase(str)`


**描述**:<p>用大驼峰,即 PascalCase 格式,来格式化字符串</p>

**参数**


| 参数名 | 描述 |
| --- | --- |
| str | <p>字符串</p> |

**返回**: <p>PascalCase 的字符串</p>

**示例**

```ts
pascalCase('ab-cd')
// AbCd

pascalCase('ab_cd')
// AbCd
```
<a name="toUnicodeAt"></a>

## `toUnicodeAt(str, index)`
Expand Down
3 changes: 1 addition & 2 deletions docs/zh/bite.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { formatBite } from 't-comm';

// or

import { formatBite} from 't-comm/lib/bite/index';
```

Expand Down
3 changes: 1 addition & 2 deletions docs/zh/build-upload.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { buildAndUpload } from 't-comm';

// or

import { buildAndUpload} from 't-comm/lib/build-upload/index';
```

Expand Down
3 changes: 1 addition & 2 deletions docs/zh/bundle-analyze.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { analyzeIndexBundle } from 't-comm';

// or

import { analyzeIndexBundle} from 't-comm/lib/bundle-analyze/index';
```

Expand Down
3 changes: 1 addition & 2 deletions docs/zh/canvas.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import {
Expand All @@ -10,7 +10,6 @@ import {
} from 't-comm';

// or

import {
addTextForImg,
mergeMultiCanvasPic,
Expand Down
3 changes: 1 addition & 2 deletions docs/zh/change-log.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { insertDocChangeLog } from 't-comm';

// or

import { insertDocChangeLog} from 't-comm/lib/change-log/index';
```

Expand Down
3 changes: 1 addition & 2 deletions docs/zh/city.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import {
Expand All @@ -13,7 +13,6 @@ import {
} from 't-comm';

// or

import {
getAreaDataAll,
getAreaData,
Expand Down
3 changes: 1 addition & 2 deletions docs/zh/clipboard.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { clipboardMp, clipboardWeb } from 't-comm';

// or

import { clipboardMp, clipboardWeb} from 't-comm/lib/clipboard/index';
```

Expand Down
3 changes: 1 addition & 2 deletions docs/zh/color.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[[toc]]

## 引入
<h2>引入</h2>

```ts
import { rgb2hsv, hsv2rgb } from 't-comm';

// or

import { rgb2hsv, hsv2rgb} from 't-comm/lib/color/index';
```

Expand Down
Loading

0 comments on commit 7fc9472

Please sign in to comment.