thing-editor icon indicating copy to clipboard operation
thing-editor copied to clipboard

Two problems in my use

Open testllg opened this issue 2 years ago • 3 comments

HI: I have two problems. 1 How to use npm package in game project? eg: I want use axios。 2 I want auto build without open editor. How to build project with command, not editor's build button?

Thanks a lot.

testllg avatar Jun 20 '22 03:06 testllg

Hi. 1 - you can init your npm project inside game folder, and install thing-editor as one of dependency by git link. And then, symlink "node_modules/thing-editor" and "node_modules" folders to top level. I had the same problem. And always deal with it by moving/symlinking node_modules folder. Maybe there is some best way.

2 - command line "node thing-editor/index.js build thing-project-example" where thing-project-example - is game folder name. It is launch chrome in headless mode to build game. This command works fine on linux (CI/CD) but windows has problems with headless mode (--headless) and chrome just do not working.

Let me know if you have any idea to make it better or need help.

Megabyteceer avatar Jun 20 '22 07:06 Megabyteceer

HI 2 I used command line "node scripts/build.js games/thing-project-example" in thing-editor foder.
This can working, can i used for build my game? Thanks!

testllg avatar Jun 20 '22 09:06 testllg

scripts/build.js does not generate src/classes.js and assets.js files. If you have latest src/classes.js and assets.js files you can use scripts/build.js. Command i sent makes everything, include sounds conversion. Because part of functions is on client side.

Megabyteceer avatar Jun 20 '22 11:06 Megabyteceer