Skip to content

Commit bd214c4

Browse files
Copilothuangyiirene
andcommitted
Remove Chinese text and update all references to use app.json instead of app.schema.json
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent ae8b77f commit bd214c4

File tree

5 files changed

+28
-28
lines changed

5 files changed

+28
-28
lines changed

docs/CLI_GUIDE.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ objectui init . --template simple
4444
cd my-app
4545

4646
# Start server
47-
objectui serve app.schema.json
47+
objectui serve app.json
4848

4949
# Custom port
50-
objectui serve app.schema.json --port 8080
50+
objectui serve app.json --port 8080
5151

5252
# Specify host
53-
objectui serve app.schema.json --host 0.0.0.0
53+
objectui serve app.json --host 0.0.0.0
5454
```
5555

5656
### 3. Edit Schema
5757

58-
Open the `app.schema.json` file and modify the JSON content to see real-time updates in your application.
58+
Open the `app.json` file and modify the JSON content to see real-time updates in your application.
5959

6060
## Command Reference
6161

@@ -81,7 +81,7 @@ objectui init . --template simple
8181
Start a development server to render your JSON schema.
8282

8383
**Arguments:**
84-
- `[schema]` - Path to JSON schema file (optional, default: `app.schema.json`)
84+
- `[schema]` - Path to JSON schema file (optional, default: `app.json`)
8585

8686
**Options:**
8787
- `-p, --port <port>` - Server port (default: `3000`)
@@ -91,8 +91,8 @@ Start a development server to render your JSON schema.
9191
```bash
9292
objectui serve
9393
objectui serve my-schema.json
94-
objectui serve app.schema.json --port 8080
95-
objectui serve app.schema.json --host 0.0.0.0 --port 3001
94+
objectui serve app.json --port 8080
95+
objectui serve app.json --host 0.0.0.0 --port 3001
9696
```
9797

9898
## Schema Examples
@@ -386,7 +386,7 @@ You can also define navigation in your main schema using button click handlers:
386386

387387
## Layouts and Nested Routes
388388

389-
**Note:** Layout support with `app.schema.json` and `_layout.schema.json` is planned for a future release. Currently, all routing is handled at the page level.
389+
**Note:** Layout support with `app.json` and `_layout.json` is planned for a future release. Currently, all routing is handled at the page level.
390390

391391
## FAQ
392392

docs/CLI_IMPLEMENTATION_SUMMARY.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ objectui init . --template simple
3434
Start development server to render JSON schema in real-time
3535

3636
```bash
37-
# 默认使用 app.schema.json / Default uses app.schema.json
37+
# 默认使用 app.json / Default uses app.json
3838
objectui serve
3939

4040
# 指定 schema 文件 / Specify schema file
4141
objectui serve my-schema.json
4242

4343
# 自定义端口 / Custom port
44-
objectui serve app.schema.json --port 8080
44+
objectui serve app.json --port 8080
4545
```
4646

4747
### 2. 技术实现 / Technical Implementation
@@ -91,7 +91,7 @@ packages/cli/
9191
└── serve.ts # serve 命令 / serve command
9292
9393
examples/cli-demo/ # 示例应用 / Example app
94-
├── app.schema.json # 演示 schema / Demo schema
94+
├── app.json # 演示 schema / Demo schema
9595
└── README.md # 使用说明 / Usage guide
9696
9797
docs/CLI_GUIDE.md # 完整文档 / Complete docs
@@ -110,7 +110,7 @@ objectui init my-dashboard
110110

111111
# 3. 启动服务器 / Start server
112112
cd my-dashboard
113-
objectui serve app.schema.json
113+
objectui serve app.json
114114

115115
# 4. 打开浏览器访问 / Open browser
116116
# http://localhost:3000

packages/cli/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ npm install -g @object-ui/cli
1111
Or use with npx:
1212

1313
```bash
14-
npx @object-ui/cli serve app.schema.json
14+
npx @object-ui/cli serve app.json
1515
```
1616

1717
## Commands
@@ -39,12 +39,12 @@ objectui init . --template dashboard
3939
Start a development server to render your JSON schema.
4040

4141
```bash
42-
objectui serve app.schema.json
42+
objectui serve app.json
4343
objectui serve my-schema.json --port 8080
4444
```
4545

4646
**Arguments:**
47-
- `[schema]` - Path to JSON schema file (default: `app.schema.json`)
47+
- `[schema]` - Path to JSON schema file (default: `app.json`)
4848

4949
**Options:**
5050
- `-p, --port <port>` - Port to run the server on (default: `3000`)
@@ -60,12 +60,12 @@ objectui serve my-schema.json --port 8080
6060

6161
2. Start the development server:
6262
```bash
63-
objectui serve app.schema.json
63+
objectui serve app.json
6464
```
6565

6666
3. Open http://localhost:3000 in your browser
6767

68-
4. Edit `app.schema.json` to customize your application
68+
4. Edit `app.json` to customize your application
6969

7070
## Example Schema
7171

packages/cli/src/cli.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ program
2424

2525
program
2626
.command('serve')
27-
.description('启动开发服务器来渲染您的JSON schema / Start a development server with your JSON schema')
28-
.argument('[schema]', 'JSON schema文件路径 / Path to JSON schema file', 'app.schema.json')
29-
.option('-p, --port <port>', '服务器端口 / Port to run the server on', '3000')
30-
.option('-h, --host <host>', '服务器绑定主机 / Host to bind the server to', 'localhost')
27+
.description('Start a development server with your JSON/YAML schema')
28+
.argument('[schema]', 'Path to JSON/YAML schema file', 'app.json')
29+
.option('-p, --port <port>', 'Port to run the server on', '3000')
30+
.option('-h, --host <host>', 'Host to bind the server to', 'localhost')
3131
.action(async (schema, options) => {
3232
try {
3333
await serve(schema, options);
3434
} catch (error) {
35-
console.error(chalk.red('错误 Error:'), error instanceof Error ? error.message : error);
35+
console.error(chalk.red('Error:'), error instanceof Error ? error.message : error);
3636
process.exit(1);
3737
}
3838
});

packages/cli/src/commands/init.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const templates = {
2121
body: [
2222
{
2323
type: 'text',
24-
content: 'This is a simple example. Edit app.schema.json to customize your application.',
24+
content: 'This is a simple example. Edit app.json to customize your application.',
2525
className: 'text-sm text-muted-foreground',
2626
},
2727
{
@@ -378,10 +378,10 @@ export async function init(name: string, options: InitOptions) {
378378
}
379379

380380
// Create schema file
381-
const schemaPath = join(targetDir, 'app.schema.json');
381+
const schemaPath = join(targetDir, 'app.json');
382382
writeFileSync(schemaPath, JSON.stringify(template, null, 2));
383383

384-
console.log(chalk.green('✓ Created app.schema.json'));
384+
console.log(chalk.green('✓ Created app.json'));
385385

386386
// Create README
387387
const readme = `# ${name}
@@ -397,14 +397,14 @@ A Object UI application built from JSON schemas.
397397
398398
2. Start the development server:
399399
\`\`\`bash
400-
objectui serve app.schema.json
400+
objectui serve app.json
401401
\`\`\`
402402
403403
3. Open your browser and visit http://localhost:3000
404404
405405
## Customize Your App
406406
407-
Edit \`app.schema.json\` to customize your application. The dev server will automatically reload when you save changes.
407+
Edit \`app.json\` to customize your application. The dev server will automatically reload when you save changes.
408408
409409
## Available Templates
410410
@@ -448,7 +448,7 @@ dist
448448
if (name !== '.') {
449449
console.log(chalk.cyan(` cd ${name}`));
450450
}
451-
console.log(chalk.cyan(' objectui serve app.schema.json'));
451+
console.log(chalk.cyan(' objectui serve app.json'));
452452
console.log();
453453
console.log(chalk.dim(' The development server will start on http://localhost:3000'));
454454
console.log();

0 commit comments

Comments
 (0)