From 8e7799266d59a628cd347006a9c023628a2a3f74 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Thu, 18 Apr 2024 10:21:07 +1000 Subject: [PATCH] Add notes --- package-lock.json | 4 ++-- package.json | 16 +++++++++------- src/index.d.ts | 8 ++++++++ tsconfig.json | 3 ++- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 36f16d2..bd5db22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "arsene", - "version": "1.0.0", + "version": "1.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "arsene", - "version": "1.0.0", + "version": "1.1.2", "license": "MIT", "devDependencies": { "typescript": "^5.4.5" diff --git a/package.json b/package.json index c6ef87f..d868d08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "arsene", - "version": "1.1.2", + "version": "1.1.3", "description": "Arsene is a library for processing CJK text paragraphs, which are mixed with English characters and adding spacing between them.", "author": "Astrian Zheng", "keywords": [ @@ -17,12 +17,14 @@ "devDependencies": { "typescript": "^5.4.5" }, - "repositories": [{ + "repositories": [ + { "type": "git", "url": "https://git.nas.astrian.moe/Astrian/arsene.git" - }, - { - "type": "git", - "url": "https://github.com/Astrian/arsene.git" - }] + }, + { + "type": "git", + "url": "https://github.com/Astrian/arsene.git" + } + ] } diff --git a/src/index.d.ts b/src/index.d.ts index e69de29..f80ce85 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -0,0 +1,8 @@ +/** + * @description 在页面上使用 Arsene 添加中英/中日文间隙 + * @param selectedNode 一个 CSS 选择器,用于选择要添加间隙的元素。支持 `.class`、`#id`、`tag` 等选择器。全局使用可以直接使用 `body`。 + * @param spacing 间隙大小,由大至小有 `2xl`、`xl`、`l`、`m`、`s` 选项。默认为 `s`。 + * @example arsene('body') + * @example arsene('.post-content', 'm') + */ +export default function (selectedNode: string, spacing?: '2xl' | 'xl' | 'l' | 'm' | 's'): void diff --git a/tsconfig.json b/tsconfig.json index 3fb76d6..4bf2698 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,8 @@ "module": "es6", "declaration": true, "outDir": "./dist", - "strict": true + "strict": true, + "removeComments": false }, "include": ["src"], "exclude": ["node_modules", "dist"]