create-aliuq 0.0.2-beta.1 → 0.0.2-beta.2
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/README.md
CHANGED
|
@@ -1,73 +1,57 @@
|
|
|
1
1
|
# create-aliuq
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Interactive project scaffolding CLI powered by [@clack/prompts](https://github.com/bombshell-dev/clack).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm create aliuq@latest
|
|
9
|
-
# or
|
|
10
|
-
npx create-aliuq
|
|
8
|
+
npm create aliuq@latest [project-name]
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
```
|
|
12
|
+
Options:
|
|
13
|
+
-n, --dry-run Simulate without writing files
|
|
14
|
+
-v, --verbose Print detailed file output
|
|
15
|
+
-l, --locale <lang> Override locale (en / zh)
|
|
16
|
+
-V, --version Print version
|
|
17
|
+
-h, --help Show help
|
|
18
|
+
```
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
## Templates
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
### web-shadcn
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|------|------|
|
|
23
|
-
| Lint 工具 | Biome / ESLint / oxlint + oxfmt |
|
|
24
|
-
| Vue Router | 路由管理 |
|
|
25
|
-
| Pinia | 状态管理 |
|
|
24
|
+
Vue 3 + Vite + Tailwind CSS v4 + shadcn-vue
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
| Prompt | Options |
|
|
27
|
+
|--------|---------|
|
|
28
|
+
| Package manager | bun / pnpm / npm / yarn |
|
|
29
|
+
| Linter | Biome / ESLint + @antfu/eslint-config / oxlint + oxfmt |
|
|
30
|
+
| Git hooks | simple-git-hooks + lint-staged (optional) |
|
|
31
|
+
| Install all shadcn components | yes / no |
|
|
32
|
+
| aliuq registry | add custom shadcn-vue registry (optional) |
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
### devcontainer
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
Generates `.devcontainer/devcontainer.json`.
|
|
32
37
|
|
|
33
|
-
|
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
| postCreateCommand |
|
|
38
|
+
| Prompt | Options |
|
|
39
|
+
|--------|---------|
|
|
40
|
+
| Registry | ghcr.io / Docker Hub / Aliyun / custom |
|
|
41
|
+
| Tag | `me` / `base` / `alpine` / `debian` (or custom image) |
|
|
42
|
+
| Forwarded ports | comma-separated list |
|
|
43
|
+
| `postCreateCommand` | shell command after container creation |
|
|
39
44
|
|
|
40
|
-
##
|
|
45
|
+
## Development
|
|
41
46
|
|
|
42
47
|
```bash
|
|
43
48
|
npm install
|
|
44
|
-
npm run dev
|
|
45
|
-
npm run build
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## 架构
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
src/
|
|
52
|
-
├── index.ts # CLI 入口
|
|
53
|
-
├── types.ts # 核心类型定义
|
|
54
|
-
├── scaffold.ts # 文件脚手架逻辑(复制 + Handlebars 处理)
|
|
55
|
-
└── templates/
|
|
56
|
-
├── index.ts # 模板注册表
|
|
57
|
-
├── web.ts # Web 模板定义
|
|
58
|
-
└── devcontainer.ts # Dev Container 模板定义
|
|
59
|
-
templates/ # 模板文件
|
|
60
|
-
├── web/ # Web 基础模板
|
|
61
|
-
├── web+biome/ # Biome 配置覆盖层
|
|
62
|
-
├── web+eslint/ # ESLint 配置覆盖层
|
|
63
|
-
├── web+oxlint/ # oxlint 配置覆盖层
|
|
64
|
-
├── web+router/ # Vue Router 文件覆盖层
|
|
65
|
-
├── web+pinia/ # Pinia 文件覆盖层
|
|
66
|
-
└── devcontainer/ # Dev Container 模板
|
|
49
|
+
npm run dev # watch mode (tsdown --watch)
|
|
50
|
+
npm run build # build to dist/
|
|
67
51
|
```
|
|
68
52
|
|
|
69
|
-
|
|
53
|
+
## Adding a Template
|
|
70
54
|
|
|
71
|
-
1.
|
|
72
|
-
2.
|
|
73
|
-
3.
|
|
55
|
+
1. Create a class extending `BaseTemplate` in `src/templates/`
|
|
56
|
+
2. Add Handlebars template files under `templates/<name>/`
|
|
57
|
+
3. Register it in `src/templates/index.ts`
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
.pnpm-store
|
|
12
|
+
dist
|
|
13
|
+
dist-ssr
|
|
14
|
+
*.local
|
|
15
|
+
|
|
16
|
+
# Editor directories and files
|
|
17
|
+
.idea
|
|
18
|
+
.DS_Store
|
|
19
|
+
*.suo
|
|
20
|
+
*.ntvs*
|
|
21
|
+
*.njsproj
|
|
22
|
+
*.sln
|
|
23
|
+
*.sw?
|
|
24
|
+
|
|
25
|
+
components.d.ts
|
|
26
|
+
auto-imports.d.ts
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
{{#if isEslint}}
|
|
3
|
+
// Disable the default formatter, use eslint instead
|
|
4
|
+
"prettier.enable": false,
|
|
5
|
+
"editor.formatOnSave": false,
|
|
6
|
+
|
|
7
|
+
// Auto fix
|
|
8
|
+
"editor.codeActionsOnSave": {
|
|
9
|
+
"source.fixAll.eslint": "explicit",
|
|
10
|
+
"source.organizeImports": "never"
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
// Silent the stylistic rules in your IDE, but still auto fix them
|
|
14
|
+
"eslint.rules.customizations": [
|
|
15
|
+
{ "rule": "style/*", "severity": "off", "fixable": true },
|
|
16
|
+
{ "rule": "format/*", "severity": "off", "fixable": true },
|
|
17
|
+
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
|
18
|
+
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
|
19
|
+
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
|
20
|
+
{ "rule": "*-order", "severity": "off", "fixable": true },
|
|
21
|
+
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
|
22
|
+
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
|
23
|
+
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
|
24
|
+
{ "rule": "*semi", "severity": "off", "fixable": true }
|
|
25
|
+
],
|
|
26
|
+
|
|
27
|
+
// Enable eslint for all supported languages
|
|
28
|
+
"eslint.validate": [
|
|
29
|
+
"javascript",
|
|
30
|
+
"javascriptreact",
|
|
31
|
+
"typescript",
|
|
32
|
+
"typescriptreact",
|
|
33
|
+
"vue",
|
|
34
|
+
"html",
|
|
35
|
+
"markdown",
|
|
36
|
+
"json",
|
|
37
|
+
"jsonc",
|
|
38
|
+
"yaml",
|
|
39
|
+
"toml",
|
|
40
|
+
"xml",
|
|
41
|
+
"gql",
|
|
42
|
+
"graphql",
|
|
43
|
+
"astro",
|
|
44
|
+
"svelte",
|
|
45
|
+
"css",
|
|
46
|
+
"less",
|
|
47
|
+
"scss",
|
|
48
|
+
"pcss",
|
|
49
|
+
"postcss"
|
|
50
|
+
],{{/if}}
|
|
51
|
+
"cSpell.words": [
|
|
52
|
+
"reka"
|
|
53
|
+
]
|
|
54
|
+
}
|