Skip to content

Latest commit

History

History
61 lines (49 loc) 路 2.76 KB

contributing.md

File metadata and controls

61 lines (49 loc) 路 2.76 KB

Contributing

Suggestions and pull requests are highly encouraged! Have a look at the open issues.

Notions

  • You will need to be familiar with npm and webpack to build this extension.
  • The extension can be loaded into Chrome or Firefox manually (See notes below)
  • JSX is used to create DOM elements.
  • All the latest DOM APIs and JavaScript features are available because the extension only has to work in the latest Chrome and Firefox. 馃帀
  • Each JavaScript feature lives in its own file under source/features and it's loaded on condition in source/content.js.
  • Some GitHub pages are loaded via AJAX/PJAX, so some features need to be in the special ajaxedPagesHandler function (see it as a custom "on DOM ready").
  • See what a feature looks like and how it's loaded
  • If you're making changes to the README, try to match the style of the content that's already there

Workflow

First clone:

git clone https://github.com/hermanya/friendly-github
cd friendly-github
npm install

When working on the extension or checking out branches, use this to have it constantly build your changes:

npm run watch # Listen for file changes and automatically rebuild

Then load or reload it into the browser to see the changes (this does not happen automatically).

Loading into the browser

Once built, load it in the browser of your choice:

Chrome Firefox
  1. Open chrome://extensions;
  2. Check the Developer mode checkbox;
  3. Click on the Load unpacked extension button;
  4. Select the folder friendly-github/distribution.
  1. Open about:debugging#addons;
  2. Click on the Load Temporary Add-on button;
  3. Select the file friendly-github/distribution/manifest.json.

Firefox offers a more advanced loading technique that includes auto-reloading in the browser as well. Check-out web-ext run.