Skip to content

Latest commit

History

History
80 lines (43 loc) 路 3.29 KB

CONTRIBUTING.md

File metadata and controls

80 lines (43 loc) 路 3.29 KB

Contributing to Cato

馃憤馃帀 First off, thanks for taking the time to contribute! 馃帀馃憤

The following is a set of guidelines for contributing to Cato. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

Before Submitting an Issue

First, please do a search in open issues to see if the issue or feature request has already been filed. If you find your issue already exists, make relevant comments and add your reaction. Use a reaction in place of a "+1" comment.

  • 馃憤 upvote

  • 馃憥 downvote

Browser Extension Development Resources

Brief Project Structure Overview

All of Cato's commands comes from the /plugins folder. Essentially, each command has it's own folder and index.js file. Currently, each command is exported as a single Object.

plugins/plugins.js is where all all of the commands get loaded into a single array and popup.js is where they are eventually used.

If you'd like to contribute a new command , please create a new folder inside plugins/. Currently this project uses async await to deal with asynchronous code. When and if you can, please try and use async/await instead of callbacks and promises.

Installing Prerequisites

You'll need git and a recent version of Node.JS (any v7.2.1+ is recommended with npm v3.10.10+). nvm is also highly recommended.

Development

Run npm install to install all dependencies for the project.

To run the extension locally, you'll need to build it with:

# Build once
npm run build
# Build every time a file changes
npm run watch

Once built, load it in the browser.

Chrome

  1. Visit chrome://extensions/ in Chrome
  2. Enable the Developer mode
  3. Click on Load unpacked extension
  4. Select the folder extension

Tips

Once you load the extension, invoke Cato by pressing the icon or command shortcut, you can option click the popup window and that will bring up the chrome developer tools for inspecting and debugging.

Consider using debugger statements in your code. They're useful when you're developing browser extensions.

Pull Requests

  • Do not include issue numbers in the PR title
  • Include screenshots and animated GIFs in your pull request whenever possible.
  • End all files with a newline

To enable us to quickly review and accept your pull requests, always create one pull request per issue and link the issue in the pull request. Never merge multiple requests in one unless they have the same root cause. Be sure to follow our Coding Guidelines and keep code changes as small as possible. Avoid pure formatting changes to code that has not been modified otherwise. Pull requests should contain tests whenever possible.