@iruka-edu/create-iruka-game 1.0.0 → 1.0.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 +55 -0
- package/dist/index.cjs +8 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @iruka-edu/create-iruka-game
|
|
2
|
+
|
|
3
|
+
The official scaffolding tool for building Iruka Mini Games. Quickly set up a new project with pre-configured templates for Phaser and React.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
You don't need to install this package globally. Simply run it using `npx`:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @iruka-edu/create-iruka-game
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Follow the interactive prompts to:
|
|
14
|
+
|
|
15
|
+
1. Enter your project name.
|
|
16
|
+
2. Choose a template (e.g., React + Phaser).
|
|
17
|
+
3. Provide your GitHub Personal Access Token (for downloading private SDK core packages).
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- 🚀 **Fast Scaffolding**: Set up a production-ready game project in seconds.
|
|
22
|
+
- 🎨 **Modern Templates**:
|
|
23
|
+
- **React + Phaser (Recommended)**: A powerful combination for building complex game UIs with React and high-performance game logic with Phaser.
|
|
24
|
+
- **Basic Phaser**: A lightweight starting point for pure Phaser development.
|
|
25
|
+
- 🛠️ **Integrated SDK**: Automatically configures the project to use `@iruka-edu/mini-game-sdk`.
|
|
26
|
+
- 🔐 **Secure Configuration**: Helps you set up `.npmrc` to access private Iruka packages securely.
|
|
27
|
+
|
|
28
|
+
## What's Included
|
|
29
|
+
|
|
30
|
+
Each scaffolded project comes with:
|
|
31
|
+
|
|
32
|
+
- A pre-configured `vite.config.ts` for fast development and optimized builds.
|
|
33
|
+
- Built-in TypeScript support.
|
|
34
|
+
- Iruka SDK integration for features like Leaderboards, User Auth, and Analytics.
|
|
35
|
+
- A basic game scene to get you started.
|
|
36
|
+
|
|
37
|
+
## Development
|
|
38
|
+
|
|
39
|
+
If you want to contribute to the CLI itself:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Clone the monorepo
|
|
43
|
+
git clone https://github.com/iruka-edu/iruka-mini-game-sdk.git
|
|
44
|
+
|
|
45
|
+
# Install dependencies
|
|
46
|
+
pnpm install
|
|
47
|
+
|
|
48
|
+
# Build the CLI
|
|
49
|
+
cd packages/create-iruka-game
|
|
50
|
+
pnpm build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT © [Iruka Edu](https://github.com/iruka-edu)
|
package/dist/index.cjs
CHANGED
|
@@ -94,6 +94,14 @@ async function init() {
|
|
|
94
94
|
//npm.pkg.github.com/:_authToken=${token}
|
|
95
95
|
`;
|
|
96
96
|
import_fs_extra.default.writeFileSync(import_node_path.default.join(root, ".npmrc"), npmrcContent.trim());
|
|
97
|
+
const gitignoreContent = `
|
|
98
|
+
node_modules
|
|
99
|
+
.npmrc
|
|
100
|
+
.env
|
|
101
|
+
dist
|
|
102
|
+
.DS_Store
|
|
103
|
+
`.trim();
|
|
104
|
+
import_fs_extra.default.writeFileSync(import_node_path.default.join(root, ".gitignore"), gitignoreContent);
|
|
97
105
|
console.log(import_picocolors.default.blue("\u{1F4E6} \u0110ang c\xE0i \u0111\u1EB7t th\u01B0 vi\u1EC7n..."));
|
|
98
106
|
try {
|
|
99
107
|
const userAgent = process.env.npm_config_user_agent || "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iruka-edu/create-iruka-game",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Create Iruka mini game (React + Phaser template)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|
|
27
|
-
"templates"
|
|
27
|
+
"templates",
|
|
28
|
+
"README.md"
|
|
28
29
|
],
|
|
29
30
|
"publishConfig": {
|
|
30
31
|
"access": "public",
|