@hupu-tech/shaper 0.0.0-stage → 0.2.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/CHANGELOG.md +19 -0
- package/LICENSE +3 -0
- package/README.md +282 -2
- package/dist/api.d.ts +29 -0
- package/dist/auth.d.ts +80 -0
- package/dist/cli.js +14 -0
- package/dist/cloud-service.d.ts +55 -0
- package/dist/cloud.d.ts +71 -0
- package/dist/config.d.ts +21 -0
- package/dist/core.d.ts +17 -0
- package/dist/credentials.d.ts +23 -0
- package/dist/dev-runner.js +1 -0
- package/dist/dev.d.ts +66 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -0
- package/dist/legacy-cloud.d.ts +25 -0
- package/dist/runtime.d.ts +54 -0
- package/dist/runtime.js +1 -0
- package/dist/shared-2ZNSJXPO.js +15 -0
- package/dist/shared-BTZI42QW.js +17 -0
- package/dist/workspace.d.ts +84 -0
- package/package.json +73 -4
- package/skills/compat/hupu-cloud/SKILL.md +8 -0
- package/skills/core/hupu-business/SKILL.md +14 -0
- package/skills/core/hupu-business/references/runtime.md +55 -0
- package/skills/core/shaper-backend/SKILL.md +35 -0
- package/skills/core/shaper-backend/references/legacy.md +41 -0
- package/skills/core/shaper-backend/references/node-server.md +44 -0
- package/skills/core/shaper-design/SKILL.md +16 -0
- package/skills/core/shaper-development/SKILL.md +54 -0
- package/skills/core/shaper-game-development/SKILL.md +16 -0
- package/skills/core/shaper-product/SKILL.md +17 -0
- package/skills/core/shaper-product/references/ecosystem.md +10 -0
- package/skills/core/shaper-release/SKILL.md +17 -0
- package/skills/game/shaper-idle-game/SKILL.md +16 -0
- package/skills/manifest.json +18 -0
- package/templates/cloud-service/README.md +32 -0
- package/templates/cloud-service/cloud.json +30 -0
- package/templates/cloud-service/handlers.cjs +46 -0
- package/templates/cloud-service/migrations/202610250001_init.sql +5 -0
- package/templates/cloud-service/migrations/202610250002_events.sql +8 -0
- package/templates/h5/docs/design.md +3 -0
- package/templates/h5/docs/product.md +3 -0
- package/templates/h5/docs/validation.md +3 -0
- package/templates/h5/index.html +24 -0
- package/templates/h5/package-lock.json +828 -0
- package/templates/h5/package.json +15 -0
- package/templates/h5/public/.gitkeep +0 -0
- package/templates/h5/shaper.config.json +7 -0
- package/templates/h5/src/main.js +7 -0
- package/templates/h5/src/style.css +21 -0
- package/templates/h5/vite.config.js +4 -0
- package/templates/phaser/docs/design.md +3 -0
- package/templates/phaser/docs/product.md +3 -0
- package/templates/phaser/docs/validation.md +3 -0
- package/templates/phaser/index.html +2 -0
- package/templates/phaser/package-lock.json +1287 -0
- package/templates/phaser/package.json +19 -0
- package/templates/phaser/public/.gitkeep +0 -0
- package/templates/phaser/shaper.config.json +7 -0
- package/templates/phaser/src/game/create-game.ts +5 -0
- package/templates/phaser/src/game/rules/scoring.ts +2 -0
- package/templates/phaser/src/game/scenes/PlayScene.ts +15 -0
- package/templates/phaser/src/main.ts +4 -0
- package/templates/phaser/src/styles.css +1 -0
- package/templates/phaser/tsconfig.json +21 -0
- package/templates/phaser/vite.config.ts +4 -0
- package/templates/react/docs/design.md +3 -0
- package/templates/react/docs/product.md +3 -0
- package/templates/react/docs/validation.md +3 -0
- package/templates/react/index.html +2 -0
- package/templates/react/package-lock.json +1329 -0
- package/templates/react/package.json +22 -0
- package/templates/react/public/.gitkeep +0 -0
- package/templates/react/shaper.config.json +7 -0
- package/templates/react/src/app/App.tsx +5 -0
- package/templates/react/src/app/styles.css +1 -0
- package/templates/react/src/main.tsx +6 -0
- package/templates/react/tsconfig.json +21 -0
- package/templates/react/vite.config.ts +4 -0
- package/vendor/cloud-server/hupu-cloud-server-0.1.0.tgz +0 -0
- package/vendor/cloud-server/release.json +12 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "shaper-phaser-app",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc --noEmit && vite build",
|
|
9
|
+
"check": "tsc --noEmit",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"phaser": "3.90.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"vite": "8.3.4",
|
|
17
|
+
"typescript": "7.0.2"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Phaser from 'phaser';
|
|
2
|
+
import { PlayScene } from './scenes/PlayScene';
|
|
3
|
+
export function createGame(parent: string) {
|
|
4
|
+
return new Phaser.Game({type: Phaser.AUTO, parent, backgroundColor: '#13242b', scale: {mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_BOTH, width: 390, height: 720}, scene: [PlayScene]});
|
|
5
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Phaser from 'phaser';
|
|
2
|
+
import { goal, nextScore } from '../rules/scoring';
|
|
3
|
+
export class PlayScene extends Phaser.Scene {
|
|
4
|
+
create() {
|
|
5
|
+
let score = 0;
|
|
6
|
+
this.add.text(195, 110, '点击圆点', {fontSize:'30px'}).setOrigin(0.5);
|
|
7
|
+
const label = this.add.text(195, 170, `0 / ${goal}`, {fontSize:'22px'}).setOrigin(0.5);
|
|
8
|
+
const target = this.add.circle(195, 350, 42, 0x77d7c9).setInteractive({useHandCursor:true});
|
|
9
|
+
target.on('pointerdown', () => {
|
|
10
|
+
score = nextScore(score); label.setText(`${score} / ${goal}`);
|
|
11
|
+
if (score === goal) {target.disableInteractive(); this.add.text(195, 480, '完成!点击再玩', {fontSize:'24px'}).setOrigin(0.5).setInteractive({useHandCursor:true}).once('pointerdown', () => this.scene.restart());}
|
|
12
|
+
else target.setPosition(Phaser.Math.Between(60,330), Phaser.Math.Between(250,420));
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html,body,#app{margin:0;width:100%;height:100%;overflow:hidden;background:#13242b}canvas{display:block;touch-action:none}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"noEmit": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"lib": [
|
|
10
|
+
"ES2022",
|
|
11
|
+
"DOM"
|
|
12
|
+
],
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"types": [
|
|
15
|
+
"vite/client"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"include": [
|
|
19
|
+
"src"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
// Shaper's host handles requests. Modern target browsers support modulepreload;
|
|
3
|
+
// avoid injecting Vite's fetch-based preload fallback into the delivered app.
|
|
4
|
+
export default defineConfig({ base: './', build: { modulePreload: { polyfill: false } } });
|