create-pixifact 0.1.3 → 0.1.4

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,8 +1,8 @@
1
1
  # create-pixifact
2
2
 
3
- Create a Bun-first Pixifact game project.
3
+ 创建 Bun-first 的 Pixifact 游戏项目。
4
4
 
5
- ## Usage
5
+ ## 使用
6
6
 
7
7
  ```bash
8
8
  bun create pixifact my-game
@@ -11,14 +11,14 @@ bun install
11
11
  bun run dev
12
12
  ```
13
13
 
14
- The generated project includes:
14
+ 生成的项目包含:
15
15
 
16
16
  - `pixifact.project.json`
17
- - a minimal Pixifact Scene pair
18
- - Vite project scripts
19
- - `pixifact` and `pixifact-cli` dependencies
17
+ - 一个最小 Pixifact Scene 资产对
18
+ - Vite 项目脚本
19
+ - `pixifact` 和 `pixifact-cli` 依赖
20
20
 
21
- ## Generated Scripts
21
+ ## 生成脚本
22
22
 
23
23
  ```bash
24
24
  bun run compile:scenes
@@ -26,6 +26,6 @@ bun run dev
26
26
  bun run build
27
27
  ```
28
28
 
29
- ## Requirements
29
+ ## 环境要求
30
30
 
31
31
  - Bun
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { createPixifactProject } from './createPixifactProject';
3
3
  function usage() {
4
4
  return [
5
- 'Usage:',
5
+ '用法:',
6
6
  ' bun create pixifact <project-name>',
7
7
  '',
8
8
  ].join('\n');
@@ -15,8 +15,8 @@ if (!name || name === '--help' || name === '-h') {
15
15
  else {
16
16
  try {
17
17
  const result = await createPixifactProject({ name });
18
- process.stdout.write(`Created ${result.name} at ${result.root}\n`);
19
- process.stdout.write(`Next: cd ${result.name} && bun install && bun run dev\n`);
18
+ process.stdout.write(`已创建 ${result.name}:${result.root}\n`);
19
+ process.stdout.write(`下一步:cd ${result.name} && bun install && bun run dev\n`);
20
20
  }
21
21
  catch (error) {
22
22
  process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-pixifact",
3
- "version": "0.1.3",
4
- "description": "Create a Pixifact game project.",
3
+ "version": "0.1.4",
4
+ "description": "创建 Pixifact 游戏项目。",
5
5
  "packageManager": "bun@1.3.13",
6
6
  "type": "module",
7
7
  "bin": {
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "git+https://github.com/hxg2050/pixifact.git",
16
+ "url": "https://github.com/hxg2050/pixifact",
17
17
  "directory": "packages/create-pixifact"
18
18
  },
19
19
  "keywords": [
@@ -10,10 +10,10 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "pixi.js": "8.18.1",
13
- "pixifact": "^0.1.3"
13
+ "pixifact": "^0.1.4"
14
14
  },
15
15
  "devDependencies": {
16
- "pixifact-cli": "^0.1.3",
16
+ "pixifact-cli": "^0.1.4",
17
17
  "typescript": "^5.3.3",
18
18
  "vite": "^8.0.10"
19
19
  }
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "version": 1,
3
3
  "name": "Pixifact Game",
4
+ "resolution": {
5
+ "width": 750,
6
+ "height": 1334
7
+ },
4
8
  "scenes": {
5
9
  "mainMenu": "src/scenes/MainMenu.scene"
6
10
  },
@@ -1,8 +1,9 @@
1
- import { Container, Graphics, Text } from 'pixi.js';
1
+ import { Graphics, Text } from 'pixi.js';
2
+ import { Group } from 'pixifact/runtime';
2
3
  import { createEvent, event, part, scene } from 'pixifact/compiler';
3
4
 
4
5
  @scene()
5
- export class MainMenu extends Container {
6
+ export class MainMenu extends Group {
6
7
  @part()
7
8
  protected declare startButtonBack: Graphics;
8
9