@nanawan/rattail 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 puijs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ <div align="center">
2
+ <a href="https://rattail.puijs.org">
3
+ <img src="https://rattail.puijs.org/logo.svg" width="150">
4
+ </a>
5
+ <h1>Rattail</h1>
6
+ <p>A Vite+ oriented, AI Agent friendly front-end toolchain</p>
7
+ <p>
8
+ <a href="https://rattail.puijs.org">Documentation</a> |
9
+ <a href="https://github.com/puijs/rattail/blob/main/README.zh-CN.md">中文介绍</a>
10
+ </p>
11
+ <p>
12
+ <img src="https://img.shields.io/npm/v/rattail?style=flat-square" alt="version">
13
+ <img src="https://img.shields.io/github/stars/puijs/rattail" alt="stars">
14
+ <img src="https://img.shields.io/npm/l/rattail.svg" alt="license">
15
+ <img src="https://img.shields.io/codecov/c/github/puijs/rattail" alt="coverage">
16
+ </p>
17
+ </div>
18
+
19
+ ---
20
+
21
+ ### Features
22
+
23
+ - ⚙️ &nbsp; Out-of-the-box [Vite+](https://viteplus.dev) presets covering linting, formatting, staged linting, git hooks, and more.
24
+ - 🔧 &nbsp; CLI toolkit for release, changelog, git hooks, commit lint, and API codegen.
25
+ - 🧰 &nbsp; 140+ utility functions for general, string, number, array, object, math, and more.
26
+ - 🚀 &nbsp; Progressive HTTP client based on axios, with Vue Composition API support.
27
+ - 📏 &nbsp; Chainable validation rule factory that adapts to any UI framework.
28
+ - 🏷️ &nbsp; Type-safe enum utility.
29
+ - 🤖 &nbsp; Provides [Agent Skills](https://github.com/puijs/rattail/tree/main/skills) for AI coding assistants to understand and use Rattail.
30
+ - 🌲 &nbsp; Tree-shakable, lightweight, and fully typed with TypeScript.
31
+ - 💪 &nbsp; 90%+ unit test coverage.
32
+ - 📄 &nbsp; MIT licensed.
33
+
34
+ ### Installation
35
+
36
+ ```shell
37
+ # npm
38
+ npm i rattail -S
39
+ # yarn
40
+ yarn add rattail
41
+ # pnpm
42
+ pnpm add rattail
43
+ ```
44
+
45
+ ### Official Docs
46
+
47
+ - [Documentation Home](https://rattail.puijs.org)
48
+ - [Getting Started](https://rattail.puijs.org/getting-started)
49
+ - [Why Rattail](https://rattail.puijs.org/why-rattail)
50
+ - [Vite+ Presets / CLI Getting Started](https://rattail.puijs.org/cli/getting-started)
51
+ - [Axle Getting Started](https://rattail.puijs.org/axle/getting-started)
52
+ - [Ruler Factory](https://rattail.puijs.org/ruler/ruler-factory)
@@ -0,0 +1,52 @@
1
+ <div align="center">
2
+ <a href="https://rattail.puijs.org/zh">
3
+ <img src="https://rattail.puijs.org/logo.svg" width="150">
4
+ </a>
5
+ <h1>Rattail</h1>
6
+ <p>面向 Vite+、AI Agent 友好的前端工具链</p>
7
+ <p>
8
+ <a href="https://rattail.puijs.org/zh">文档</a> |
9
+ <a href="https://github.com/puijs/rattail/blob/main/README.md">ENGLISH README</a>
10
+ </p>
11
+ <p>
12
+ <img src="https://img.shields.io/npm/v/rattail?style=flat-square" alt="version">
13
+ <img src="https://img.shields.io/github/stars/puijs/rattail" alt="stars">
14
+ <img src="https://img.shields.io/npm/l/rattail.svg" alt="license">
15
+ <img src="https://img.shields.io/codecov/c/github/puijs/rattail" alt="coverage">
16
+ </p>
17
+ </div>
18
+
19
+ ---
20
+
21
+ ### 特性
22
+
23
+ - ⚙️ &nbsp; 面向 [Vite+](https://viteplus.dev) 的开箱即用配置预设,覆盖代码检查、格式化、暂存区检查和 Git Hooks 等。
24
+ - 🔧 &nbsp; CLI 工具链,支持发布、日志、Git Hooks、Commit Lint、API 生成。
25
+ - 🧰 &nbsp; 140+ 工具函数,覆盖通用、字符串、数字、数组、对象、数学等场景。
26
+ - 🚀 &nbsp; 基于 axios 的渐进式请求工具,支持 Vue 组合式 API。
27
+ - 📏 &nbsp; 链式校验规则工厂,适配任意 UI 框架。
28
+ - 🏷️ &nbsp; 类型安全的枚举工具。
29
+ - 🤖 &nbsp; 提供 [Agent Skills](https://github.com/puijs/rattail/tree/main/skills),帮助 AI 编程助手理解和使用 Rattail。
30
+ - 🌲 &nbsp; 可 Tree-shake,轻量,TypeScript 完整类型支持。
31
+ - 💪 &nbsp; 90%+ 单元测试覆盖率。
32
+ - 📄 &nbsp; MIT 开源协议。
33
+
34
+ ### 安装
35
+
36
+ ```shell
37
+ # npm
38
+ npm i rattail -S
39
+ # yarn
40
+ yarn add rattail
41
+ # pnpm
42
+ pnpm add rattail
43
+ ```
44
+
45
+ ### 官方文档
46
+
47
+ - [文档首页](https://rattail.puijs.org/zh)
48
+ - [快速开始](https://rattail.puijs.org/zh/getting-started)
49
+ - [为什么选择 Rattail](https://rattail.puijs.org/zh/why-rattail)
50
+ - [Vite+ 预设 / CLI 快速开始](https://rattail.puijs.org/zh/cli/getting-started)
51
+ - [Axle 快速开始](https://rattail.puijs.org/zh/axle/getting-started)
52
+ - [Ruler Factory](https://rattail.puijs.org/zh/ruler/ruler-factory)
package/package.json ADDED
@@ -0,0 +1,152 @@
1
+ {
2
+ "name": "@nanawan/rattail",
3
+ "version": "2.0.9",
4
+ "description": "A Vite+ oriented, AI Agent friendly front-end toolchain",
5
+ "keywords": [
6
+ "ai-agent",
7
+ "cli",
8
+ "presets",
9
+ "toolchain",
10
+ "typescript",
11
+ "utilities",
12
+ "vite-plus"
13
+ ],
14
+ "bugs": {
15
+ "url": "https://github.com/puijs/rattail/issues"
16
+ },
17
+ "license": "MIT",
18
+ "author": "haoziqaq <357229046@qq.com>",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/puijs/rattail.git"
22
+ },
23
+ "bin": {
24
+ "rt": "dist/cli/bin.mjs"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "type": "module",
30
+ "sideEffects": false,
31
+ "main": "dist/index.mjs",
32
+ "module": "dist/index.mjs",
33
+ "types": "dist/index.d.mts",
34
+ "typesVersions": {
35
+ "*": {
36
+ "vite-plus": [
37
+ "dist/vite-plus/index.d.mts"
38
+ ],
39
+ "axle": [
40
+ "dist/axle/index.d.mts"
41
+ ],
42
+ "axle/use": [
43
+ "dist/axle/use.d.mts"
44
+ ],
45
+ "axle/api": [
46
+ "dist/axle/api.d.mts"
47
+ ],
48
+ "ruler": [
49
+ "dist/ruler-factory/index.d.mts"
50
+ ],
51
+ "ruler-factory": [
52
+ "dist/ruler-factory/index.d.mts"
53
+ ],
54
+ "cli": [
55
+ "dist/cli/index.d.mts"
56
+ ]
57
+ }
58
+ },
59
+ "exports": {
60
+ ".": {
61
+ "types": "./dist/index.d.mts",
62
+ "import": "./dist/index.mjs"
63
+ },
64
+ "./vite-plus": {
65
+ "types": "./dist/vite-plus/index.d.mts",
66
+ "import": "./dist/vite-plus/index.mjs"
67
+ },
68
+ "./axle": {
69
+ "types": "./dist/axle/index.d.mts",
70
+ "import": "./dist/axle/index.mjs"
71
+ },
72
+ "./axle/use": {
73
+ "types": "./dist/axle/use.d.mts",
74
+ "import": "./dist/axle/use.mjs"
75
+ },
76
+ "./axle/api": {
77
+ "types": "./dist/axle/api.d.mts",
78
+ "import": "./dist/axle/api.mjs"
79
+ },
80
+ "./ruler": {
81
+ "types": "./dist/ruler-factory/index.d.mts",
82
+ "import": "./dist/ruler-factory/index.mjs"
83
+ },
84
+ "./ruler-factory": {
85
+ "types": "./dist/ruler-factory/index.d.mts",
86
+ "import": "./dist/ruler-factory/index.mjs"
87
+ },
88
+ "./cli": {
89
+ "types": "./dist/cli/index.d.mts",
90
+ "import": "./dist/cli/index.mjs"
91
+ }
92
+ },
93
+ "scripts": {
94
+ "dev": "vp pack --watch",
95
+ "build": "vp pack",
96
+ "clean": "tsx src/cli/bin.ts clean",
97
+ "docs:build": "vitepress build docs",
98
+ "docs:dev": "vitepress dev docs",
99
+ "docs:preview": "vitepress preview docs",
100
+ "format": "vp fmt",
101
+ "lint": "vp lint --fix",
102
+ "release": "pnpm build && tsx src/cli/bin.ts release",
103
+ "test:watch": "vp test watch",
104
+ "test": "vp test run --coverage"
105
+ },
106
+ "dependencies": {
107
+ "@configurajs/vite-plus": "0.2.6",
108
+ "@nanawan/axle": "1.0.2",
109
+ "@nanawan/release": "^2.2.1",
110
+ "api-farmer": "0.1.5",
111
+ "commander": "^13.0.0",
112
+ "js-cookie": "3.0.5",
113
+ "mitt": "3.0.1",
114
+ "rimraf": "^6.0.1",
115
+ "ruler-factory": "0.0.14",
116
+ "unconfig": "^7.5.0",
117
+ "uuid": "13.0.0"
118
+ },
119
+ "devDependencies": {
120
+ "@types/node": "^22.8.1",
121
+ "@vitest/coverage-istanbul": "^4.1.0",
122
+ "jsdom": "^25.0.1",
123
+ "oxc-minify": "^0.124.0",
124
+ "tsx": "^4.21.0",
125
+ "typescript": "5.3.3",
126
+ "vite-plus": "0.1.19",
127
+ "vitepress": "2.0.0-alpha.17",
128
+ "vitest": "$vitest"
129
+ },
130
+ "peerDependencies": {
131
+ "@voidzero-dev/vite-plus-core": ">=0.1.16",
132
+ "vite-plus": ">=0.1.16"
133
+ },
134
+ "peerDependenciesMeta": {
135
+ "@voidzero-dev/vite-plus-core": {
136
+ "optional": true
137
+ },
138
+ "vite-plus": {
139
+ "optional": true
140
+ }
141
+ },
142
+ "engines": {
143
+ "pnpm": ">=10.0.0"
144
+ },
145
+ "packageManager": "pnpm@10.0.0",
146
+ "pnpm": {
147
+ "overrides": {
148
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.1.19",
149
+ "vitest": "npm:@voidzero-dev/vite-plus-test@0.1.19"
150
+ }
151
+ }
152
+ }