Skip to content

Latest commit

 

History

History
104 lines (69 loc) · 4.13 KB

CONTRIBUTING.md

File metadata and controls

104 lines (69 loc) · 4.13 KB

Contributing to SABRE.js

Thank you for your interest in contributing to SABRE.js. This document will help you get started contributing to the project.

Useful links

Setting up the development environment

In order to work on SABRE.js you will need to install the following utilities:

  • Java Runtime Environment
  • curl
  • nodeJS
  • make

To run a compile of files changed since the last build run the following command:

make

To re-compile all files run the following command:

make rebuild

To run all tests run the following command:

make test

To run a visual feature test run the following command:

make run

Additional Info

Source files are in ./src/ "header" files are in ./include/. The "header" files list the internal shared APIs the different files use to communicate with each other. See here and here.

Folder Structure

  • src/ -- Main sourcecode for the project (excluding src/__tests__)
  • src/__tests__/ -- Test code for test driven development.
  • include/ -- Browser API definitions and internal API definitions for the Closure Compiler (Files in this folder aren't compiled).
  • bin/ -- Output directory for production code.
  • debugbin/ -- Output directory for debug code.
  • scripts/ -- Contains scripts that are run by the makefile.
  • tbin/ -- Contains the Closure Compiler and other build tools.
  • temp_files/ -- Temporary files.
  • test/ -- Directory used when running the debug server.

Pull Requests

Pull requests are to be submitted through github's interface but must be rebased upon the latest version before submitting. The only merge commit should be the one generated by github's Pull Request interface.

Pull requests must reference the issue they resolve. If you are creating a pull request for an enhancement you must submit an issue that requests the enhancement and then create a pull request that references that issue.

If it is your first pull request in this project don't forget to add your name to CONTRIBUTORS.md, You may chose if you wish to add your discord account next to your name/alias.

Style Guide/Coding Conventions

Prettier is used to auto-enforce styling, in addition certain styling is necessary for the compiler, if a variable will be made available to other files in the project it must be added to the current file's header file and inside the current file it must use bracket syntax like so:

sabre["objectName"]["variableName"];

or if defining something on the global scope:

global["exampleGlobalVariable"];

or if definining something on the external facing API:

external["exampleExternalVariable"];

Please note: this only applies if the file you are currently in is creating the variable. If it is a variable of another file you do not need to use the bracket syntax.

All classes should be defined using Object.create(/* Object or superclass */,{/* class definition */}). Instantiation of objects from a class may be done via Object.create(/* class */) or a helper method that contains such a call that returns the created object after intializing it. Helper methods that create objects should be called using the new keyword. For examples see the existing codebase.

Looking for a good first contribution?

Check out our issue tracker and look for issues labeled "Good First Issue".

Questions?

Ask us them on our Discord Server.