From 54c0088b9c31ef8b2bd413160086ca8858bbfdac Mon Sep 17 00:00:00 2001 From: Barin Britva Date: Mon, 8 Jul 2024 14:56:39 +0700 Subject: [PATCH] Prepare @ton/cocos-sdk for publication. --- .github/workflows/deploy-docs.yml | 4 ---- .github/workflows/publish-npm.yml | 2 +- README.md | 15 +++++++++++---- package.json | 2 +- packages/cocos/package.json | 5 ++--- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 5e928b2..71c2c3b 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -2,10 +2,6 @@ name: Deploy static content to Pages on: - # Runs on pushes targeting the default branch - push: - branches: ['main'] - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 7fa7fef..a891d93 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -15,7 +15,7 @@ jobs: - id: get-package run: | PACKAGE_NAME=$(echo ${GITHUB_REF#refs/tags/} | cut -d- -f1) - ALLOWED_PACKAGES=("phaser") # Add more package names if needed + ALLOWED_PACKAGES=("phaser" "cocos") if [[ " ${ALLOWED_PACKAGES[@]} " =~ " ${PACKAGE_NAME} " ]]; then echo "::set-output name=package::${PACKAGE_NAME}" echo "::set-output name=version::${GITHUB_REF#refs/tags/}" diff --git a/README.md b/README.md index 87a6032..22b4637 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,17 @@ # game-engines-sdk TON blockchain bindings and utilities for game engines: -* Phaser.io -* Cocos2d (coming soon) +* [Phaser](https://phaser.io) +* [Cocos](https://www.cocos.com/en) # Getting started Installation: ```sh -npm install --save @ton/phaser-sdk +# for Phaser +npm install --save @ton/phaser-sdk@beta + +# for Cocos +npm install --save @ton/cocos-sdk@beta ``` Creating GameFi instance: @@ -79,7 +83,10 @@ This can be used for: | [merchantJettonAddress](https://ton-org.github.io/game-engines-sdk/classes/GameFi.html#merchantJettonAddress) | in-game shop's jetton used as in-game currency | # Use cases -To learn complex use cases read [TON GameFi article](https://gist.github.com/barinbritva/b3db1605f2667b7562b53a23877c0e73) and check out the source code of demo [Flappy Bird game](https://github.com/ton-community/flappy-bird). +To learn complex use cases: +- read [TON GameFi article](https://gist.github.com/barinbritva/b3db1605f2667b7562b53a23877c0e73) +- check out the source code of [Flappy Bird](https://github.com/ton-community/flappy-bird) demo for Phaser +- check out the example of [Flappy Bird](https://github.com/CocosTechLabs/flappy-bird) for Cocos # References The full [typedoc references](https://ton-org.github.io/game-engines-sdk/index.html). diff --git a/package.json b/package.json index bc609fe..d62949e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "workspaces": ["packages/phaser", "packages/cocos"], "scripts": { "check-types": "tsc --noEmit", - "typedoc": "typedoc --out docs packages/phaser/src/index.ts", + "typedoc": "typedoc --out docs packages/phaser/src/index.ts packages/cocos/src/index.ts", "lint": "prettier --check \"./**/*.{js,jsx,ts,tsx,json,yml}\"" }, "devDependencies": { diff --git a/packages/cocos/package.json b/packages/cocos/package.json index d85d393..6429215 100644 --- a/packages/cocos/package.json +++ b/packages/cocos/package.json @@ -6,9 +6,8 @@ "types": "dist/cocos/src/index.d.ts", "module": "dist/index.ts", "scripts": { - "dev": "tsc --watch", - "build": "tsc", - "build:webpack": "webpack --mode production" + "dev": "webpack --mode development --watch", + "build": "webpack --mode production" }, "dependencies": { "@tonconnect/ui": "^2.0.1-beta.0",