create-pixifact 0.1.3 → 0.1.5
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
|
-
|
|
3
|
+
创建 Bun-first 的 Pixifact 游戏项目。
|
|
4
4
|
|
|
5
|
-
##
|
|
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
|
-
|
|
14
|
+
生成的项目包含:
|
|
15
15
|
|
|
16
16
|
- `pixifact.project.json`
|
|
17
|
-
-
|
|
18
|
-
- Vite
|
|
19
|
-
- `pixifact`
|
|
17
|
+
- 一个最小 Pixifact Scene 资产对
|
|
18
|
+
- Vite 项目脚本
|
|
19
|
+
- `pixifact` 和 `pixifact-cli` 依赖
|
|
20
20
|
|
|
21
|
-
##
|
|
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
|
-
##
|
|
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
|
-
'
|
|
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(
|
|
19
|
-
process.stdout.write(
|
|
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.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.5",
|
|
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": "
|
|
16
|
+
"url": "https://github.com/hxg2050/pixifact",
|
|
17
17
|
"directory": "packages/create-pixifact"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
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
|
|
6
|
+
export class MainMenu extends Group {
|
|
6
7
|
@part()
|
|
7
8
|
protected declare startButtonBack: Graphics;
|
|
8
9
|
|