Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.23 KB

CONTRIBUTING.md

File metadata and controls

56 lines (40 loc) · 2.23 KB

Contriburing to Darkness

Please help us improve existing skins and create new ones. Pull requests are welcome!

How to start developing?

  1. If you haven't yet, first install Darkness locally
  2. Run npm start to watch SCSS files and compile them in real-time.

How do I...

Fix or improve an existing skin

Edit /themes/websites/[KEY].scss (e.g. /themes/websites/youtube.scss)

Add a skin for an new website (e.g. BBC, Google Drive)

Just run gulp skin:create --key=[KEY] where [KEY] is lowercase and alphanumeric (e.g. bbc, googledrive).

Then follow the instructions:

  1. Edit /js/background/config.js and add your website to CONFIG.sites, use [KEY] as a key
  2. Browse to chrome://extensions/ and reload the Darkness extension
  3. Edit your new skin: /themes/websites/[KEY].scss
  4. Don't forget to run npm start to watch SCSS files and compile them in real-time.

Fix or improve a color theme

Edit /themes/themes/[THEME].scss (e.g. /themes/themes/material.scss)

Create a new color theme (in addition to Monokai, Tomorrow, etc.)

Open /themes/themes/THEME-TEMPLATE.scss in your code editor and follow the instructions.

How to push code back to Darkness?

  1. Please test your changes locally in Chrome
  2. Commit and push:
cd darkness
git add .
git commit -m "Description of Changes"
git push origin master
  1. Go to GitHub and navigate to your fork of Darkness.
  2. Click the New pull request button (above the file list)
  3. Click the Create pull request button.
  4. Add a description for your pull request and click Create pull request

Advanced usage

Compiling SASS files manually

  • To compile all SASS files now: gulp sass:compile
  • To watch all SASS files and compile in real-time: gulp sass:watch (alias: npm start)
  • To clean up all .css and .css.map files: gulp sass:cleanup

Git Configuration

After installling Darkness locally, the 1st remote is origin, which points to your fork on GitHub (use it to push and pull). The 2nd remote that is added by you is upstream that points to the original Darkness repo (use it to fetch and make pull requests). See diagram.