Skip to content
Manny Colon edited this page Oct 24, 2017 · 7 revisions
  1. View the setup instructions over at: Setup
  2. Let the team know what feature you are working on, by messaging us on Slack, and making use of the Zenhub board.
  3. Contributions should be done on a branch named of the following format feature/YOUR-NAME-OR-LAST-NAME/NAME-OF-FEATURE/ISSUE_NUMBER. For example: feature/manny/contributing-instructions/2031 This branch should be based off develop.
  4. Tool development is to be done in the translationCoreApps organization. Each tool has its own repo there.
  5. Commits should be in detail and give a clear idea of what is being done and why. Same goes for pull requests, be sure to follow the template. It is important to commit early and often.
  6. Merge locally with develop when changes occur.
  7. Ensure your code works. Test, Test, Test.
  8. Push your branch to your remote.
  9. Submit a Pull Request with develop.

Writing Files Paths

Since we are building an electron app special care must be taken with writing file paths.

  1. anything and everything imported with a require or equivalent statement should have it's path written according to what is common in node. In other words, nothing special is required. Just enter the relative path and you'll do fine.
  2. external files (for example in the user's home directory) must be written as an absolute path. In most cases your absolute path should begin with path.homedir().
  3. internal files (files or scripts loaded dynamically from the code base. e.g. src/assets/projectLicenses/...) must be written as paths relative to the project root directory and pre-pended with the __dirname global string.

There is one exception to all of this. File paths in tests do not need to follow these guidelines since they will obviously not be part of the running application. Instead all file paths in tests should simply use relative file paths (see __tests__/ for examples).

Examples in order of guideline:

  1. import books from '../../../tC_resources/resources/books';
  2. path.join(path.homedir(), 'translationCore/resources');
  3. path.join(__dirname, '../../../tC_apps');