Skip to content

New Developer Setup

CreativeBuilds edited this page Jul 10, 2019 · 1 revision

New Developer Setup

Errors

If you have any issues with this guide or feel like it's missing a step feel free to reach out to me on discord CreativeBuilds#0001

This is the page for Javascript Developers who would like to edit the bot and add their own spin!

  1. Create a new Fork Forking allows you to change the bot as you wish however you like, make your own changes and share them with the world! This also helps out with code management and any cool ideas that you create can always be pulled back into the main branch aka this one!

If you don't know how to create a fork you can check out this blog post by Github

  1. Download the Repo to your local machine for development This is pretty straight forward, use whatever client you want to download your github repo. If you have never done this before I personally recommend Github Desktop which provides a GUI interface to interact with Github!

  2. Installing NPM & NodeJs Most people here will already have these things installed, but if you are a first time developer trying to check out the source code (awesome first steps if I may say so) then you will need to download NodeJS. NPM is bundled inside of it so don't worry about having to desperately download NPM. You can download NodeJS here

  3. Initializing the Directory Open a console and navigate to the directory of your project. Personally I recommend the code editor Visual Studio Code. If you're using that, just press **ctrl + ** or cmd if you're on mac. Then run npm i` this will go through and download all the dependencies you need.

  4. Adding firebaseConfig.ts Create a new file in the folder {YourProjectDir}/src/javascript/helpers called firebaseConfig.ts. Now since the bot runs on the cloud, you will need create a firebase account (dont worry this isnt that hard!) Head on over to firebase and login to your Google account!

Once logged in you should see a button that says "Add Project" with a plus sign.

Add Project

Name the project whatever you want, and accept the terms and conditions. After you do so, hit Create Project in the bottom right.

On the left side of your screen after the project is made, you should see a Project Overview button and a wheel. Click the wheel and you should see Project Settings

Project Settings

Scroll down on that page until you see a Firebase SDK snippet area, there should be three options Automatic CDN and Config. The default will be set to Automatic but click Config instead. You should see something like this

firebaseConfig

Copy everything but the const and then head back over to firebaseConfig.ts start the first line of the file with export var and then paste it in. Now your file should look something like export var firebaseConfig = {...configstuffhere} Save the file and you should be good to go!

  1. Compiling! Whenever you make a change to the app you will need to recompile, to do so run npm run electron-compile this will compile everything for the app, and may take a little bit of time.

  2. Booting the bot! Woo hoo! You made it this far, congrats! Now all is left is npm run start and after around 15-30 seconds, the app should boot!