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
- 基于 [@clack/prompts](https://github.com/bombshell-dev/clack) 的项目脚手架工具。
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
- ### Web
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
- Vue 3 + Vite (rolldown-vite) + Tailwind CSS v4 + shadcn-vue 前端项目模板。
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
- ### Dev Container
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
- 生成 `.devcontainer/devcontainer.json` 配置。
34
+ ### devcontainer
30
35
 
31
- **可选项:**
36
+ Generates `.devcontainer/devcontainer.json`.
32
37
 
33
- | 选项 | 说明 |
34
- |------|------|
35
- | 基础镜像 | Ubuntu / Node.js / Python / Universal / 自定义 |
36
- | Features | Node.js / Python / Docker-in-Docker / GitHub CLI / Git / Common Utils |
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 # 直接运行 CLI(tsx)
45
- npm run build # 构建(tsdown)
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. `src/templates/` 中创建模板定义文件,实现 `TemplateDefinition` 接口
72
- 2. `templates/` 中创建对应的模板文件目录
73
- 3. `src/templates/index.ts` 中注册模板
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-aliuq",
3
- "version": "0.0.2-beta.1",
3
+ "version": "0.0.2-beta.2",
4
4
  "description": "Scaffolding tool for aliuq projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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,10 @@
1
+ {
2
+ "recommendations": [
3
+ "Vue.volar",
4
+ "bradlc.vscode-tailwindcss"{{#if isBiome}},
5
+ "biomejs.biome"{{/if}}{{#if isEslint}},
6
+ "dbaeumer.vscode-eslint",
7
+ "davidanson.vscode-markdownlint"{{/if}}{{#if isOxlint}},
8
+ "oxc.oxc-vscode"{{/if}}
9
+ ]
10
+ }
@@ -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
+ }