Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoslabs committed Jun 24, 2024
1 parent ee3eb73 commit c0e8948
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: npm ci

- name: Build
run: npm run build --workspace @ton/${{ steps.get-package.outputs.package }}-sdk
run: npx webpack --mode production && npx tsc --declaration --emitDeclarationOnly

- name: Publish
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const gameFi = await CocosGameFi.create({ connector: uiconnector });
| [merchantJettonAddress](https://cocostechlabs.github.io/game-engines-sdk/classes/CocosGameFi.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) and check out the source code of demo [Flappy Bird game](https://github.com/CocosTechLabs/flappy-bird).

# References
The full [typedoc references](https://cocostechlabs.github.io/game-engines-sdk/index.html).
14 changes: 7 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const TypescriptDeclarationPlugin = require('typescript-declaration-webpack-plug

module.exports = {
mode: 'production',
entry: './src/index.ts', // 入口文件
entry: './src/index.ts',
module: {
rules: [
{
Expand All @@ -21,21 +21,21 @@ module.exports = {
},
},
output: {
filename: 'index.ts', // 输出文件名
path: path.resolve(__dirname, './lib'), // 输出目录
filename: 'index.ts',
path: path.resolve(__dirname, './lib'),
libraryTarget: 'module',
},
experiments: {
outputModule: true, // 启用 outputModule 实验性功能
outputModule: true,
},
target: ['web', 'browserslist:> 0.5%, not dead'], // 设置 target 以确保输出 ESM 代码
externals: [], // 配置外部依赖,这里留空,表示所有依赖都打包
target: ['web', 'browserslist:> 0.5%, not dead'],
externals: [],
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new TypescriptDeclarationPlugin({
out: 'index.d.ts', // 输出的声明文件名
out: 'index.d.ts',
exclude: /node_modules/,
}),
]
Expand Down

0 comments on commit c0e8948

Please sign in to comment.