Skip to content

teslaworksumn/lightshow-Gallium

Repository files navigation

Gallium

Gallium is a GUI Application for running Tesla Works Light Show Events.

Directory structure:

└── app
    ├── config
    ├── css
    ├── html
    ├── js
    └── img
└── test
  • app/ houses the app and all the files needed.
  • app/config contains config files.
  • app/css contains CSS files that are used in Gallium.
  • app/html contains HTML files that are used in Gallium.
  • app/js contains JavaScript files that are used in Gallium.
  • app/img contains image files that are used in Gallium.
  • test/ contains the test suite for Gallium.

Pre-requisites (all users)

  1. Node.js installed and in PATH.

We are supporting Node.js version 10.16.3. Installing via your operating system's package manager is an easy way to make sure it is set up correctly. Simply paste the command line options into the terminal and Node.js will be installed. Otherwise you can download the installer and set it up that way.

Windows users

  1. Run npm install --global --production windows-build-tools from an elevated Powershell or CMD.exe (run as Administrator). Note that this step will take a while so be sure to give it some time to finish. Even though the command will stop outputing information, it still is working.

Mac users

  1. XCode command line tools must be installed for most commands to work. If you don't already have XCode installed, either install the latest version of XCode from the app store or run xcode-select --install if you only want to install the XCode command line tools. Note that this step may take a while so be sure to give it some time to finish.

Dev Environment Setup and Running

Only run these steps after you have completed the pre-requisite steps.

  1. Change directory to the repo root directory (lightshow-Gallium/)
  2. Run npm install to install npm dependencies
  3. Run node setupRepo.js to initialize certain directories and files

Running the app

  1. Run npm start

NOTE: If you get an error that looks like error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory while running npm start, you will have to install this shared library. This is fixed with sudo apt-get install libgconf-2-4.

Application Packaging

  1. Change directory to the repo root directory (lightshow-Gallium/)
  2. Run npm install
  3. Run node setupRepo.js
  4. Run npm run-script package

NOTE: If you are on Mac or Linux, you will need Wine installed to package a Windows Build.

Scripts

  • npm start - Start an instance of the developer build
  • npm run-script lint - Lint the code
  • npm run-script lint-fix - Automatically fix common linting errors
  • npm run-script pack - Generates the package directory without really packaging it
  • npm run-script build - Package app in a distributable format for the current OS
  • npm run-script buildall - Package app in a distributable format for Windows, MacOS, and Linux
  • npm run-script buildosx - Package app in a distributable format for MacOS
  • npm run-script buildwin - Package app in a distributable format for Windows
  • npm run-script buildlinux - Package app in a distributable format for Linux
  • npm run-script test - Run the test suite contained in test/

Styles

We are using a modified version of the Airbnb JavaScript Style Guide. One major change from the Airbnb guide is that we are using 4 space indents instead of 2. Run npm run-script lint to lint our code and npm run-script lint-fix to fix common errors. Some errors might need to be fixed manually.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details