0.6.3 • Published 2 days ago

gamelet-cli v0.6.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

gamelet-cli

Help to download project from code.gamelet.com, edit/test in vscode and sync back to server.

Create Local Workspace of your CG Project

You can download your CG project files to local and create a nice workspace of VSCode to develop locally.

Download Project Token File

Before creating the workspace, you need to download a token file in your project page.

  1. Open your project page on code.gamelet.com
  2. Open the "Project Info" panel from the right-side toolbar.
  3. Click the "Npm" button above the project code.
  4. Toggle the "Allow local dev with npm"
  5. Click the "Download dev-token" button to download

Use the Project Token

Make sure you have the token file in a proper folder, and the apps below are installed

  1. Install gamelet-cli
npm install -g gamelet-cli
  1. Create workspace of your project

    Run the command in the folder of the token file:

gamelet download

Choose a token file when the command prompts you a list of choices. The command will create the workspace in a default folder that is named by the project code.

If custom folder of workspace is desired, use the flag --dir

// assign a custom folder
gamelet download --dir=testfolder
// assign a token file and a folder
gamelet download myProject.token --dir=testfolder
  1. Install npm packages
// enter the folder that is created from the above command
cd your-project-folder-just-created
// install packages
npm install
  1. Transpile and run a local server

// one line command
npm start

The command will transpile your typescripts and re-transpile when any file is changed. It also creates a local server so you can test the project at http://localhost:3000

  1. Test and Debug

    Open the "Run and Debug" on the left-side-toolbar of your vscode, find and click the "Play Game" button to run the game. Change the button to "Test Module" to run the testbed.

  2. Sync the workspace from the CG project

    After the workspace is built, you can run the below command to sync resources from your CG project on code.gamelet.com

// run the commands inside the workspace folder

// sync everything and merge sources from CG
gamelet merge
// sync only sources
gamelet merge --item=source
// sync only sources without git commit
gamelet merge --item=source --force
// sync only resources
gamelet merge --item=resource
// sync items and badges
gamelet merge --item=item,badge
/**
 * available sync items are
 * - source
 * - resource
 * - item
 * - badge
 * - score
 */
  1. Upload the sources back to CG

    Once you are satisfied with the codes, you can upload the source back to the CG server. Before uploading, make sure you have merge the latest sources from server by running the command "gamelet merge".

    // run the commands inside the workspace folder
    
    // merge first
    gamelet merge
    // upload
    gamelet upload
0.6.3

2 days ago

0.6.2

2 months ago

0.6.1

2 months ago

0.6.0

2 months ago

0.5.0

4 months ago

0.4.7

9 months ago

0.4.5

11 months ago

0.4.4

11 months ago

0.4.6

11 months ago

0.4.3

12 months ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.25

2 years ago

0.3.24

2 years ago

0.3.23

2 years ago

0.3.22

2 years ago

0.3.21

2 years ago

0.3.20

3 years ago

0.3.19

3 years ago

0.3.18

3 years ago

0.3.17

3 years ago

0.3.16

3 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.4

3 years ago

0.3.9

3 years ago

0.3.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.3

3 years ago

0.2.15

3 years ago

0.2.14

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.3

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.1

3 years ago

0.2.2

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago