Skip to content

Commit

Permalink
Prepare @ton/cocos-sdk for publication.
Browse files Browse the repository at this point in the history
  • Loading branch information
barinbritva committed Jul 8, 2024
1 parent 6fd14fa commit 54c0088
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/}"
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 2 additions & 3 deletions packages/cocos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 54c0088

Please sign in to comment.