-
Notifications
You must be signed in to change notification settings - Fork 8
Getting Started
To work with GDExt code you need:
- Node.js
- NPM (Comes with Node.js by default)
- Git Client
After you've cloned the repository, navigate into it's directory (in this wiki, we'll refer to it as ./editor). After that open command prompt window and type
npm install
This will install all of the required modules for GDExt.
GDExt is built using Webpack and Electron.
Please note, that this repo does not contain any Electron-related code and runs in the browser, visit gdext/electron for the Electron app.
Here's how the file structure should look approximately:
I'll go over a few important files/directories:
-
/src- the source code directory, it contains all the scripts, styles and other assets for gdext. -
/dist- the destination folder (generated on build), it contains the code generated by webpack to test in the browser. Do not edit the code in it directly! -
/package.jsonand/package-lock.json- configuration files for Node.js -
/webpack.config.js- configuration file for Webpack, contains the info about where to generate the destination code and what modules to use for file loading. -
/chtml.js- a script that automatically creates the HTML file in the destination directory. -
LICENSEandREADME.md- github stuff
To test the app in browser, open command prompt in the ./editor directory and run the following command:
npm run build
This will generate the destination folder and all of it's contents. After that, run:
npx http-server -p 8000 -c -1
This will setup a local http server. Finally open the browser of your choice and go to localhost:8000/dist. You should see something like this:
Before testing, please clone the gdext/electron repository to some directory (in this wiki, we'll refer to it as ./electron). Also, open command prompt both in ./editor and ./electron and type npm install to install all the modules.
After that, open command prompt in ./editor and type:
npm run build
Then, go into ./editor/dist and copy all the files in that directory over to ./electron/web (replacing the old files).
Finally, open command prompt in ./electron and type in the following:
npx electron .
A window should pop up with GDExt interface. To close it, either click the "X" button in the window itself, or press Ctrl+C in the command prompt and then type Y.
If you've ran into a problem, try reading this page again and see if you've missed some steps.
TODO: add more pages lol

