myarete / habitrpg-chrome

Chrome extension for HabitRPG. Uses 3rd party productivity website events to trigger point gain/loss.

Home Page:https://chrome.google.com/webstore/detail/habitrpg/pidkmpibnnnhneohdgjclfdjpijggmjj?hl=en-US

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Habitica browser extensions

Packed files:

About the development

The main goal is keeping away the core code from the browser dependency, so it can use in multiple platform. But since every browser has an own extension structure it's not an easy task...

The tools which are help achive that holy goal:

  • small separated files
  • event based communication
  • build system which pack everything together

Development environment setup

The build system is the Grunt task runner. If you don't know definitely check it (life saver stuff:).

  • The first step is get the nodejs and install.
  • Secondly get the grunt-cli package npm install -g grunt-cli
  • And the final step is go to the root of the cloned folder and type npm install and it will download all necessary stuff

That's is. You are ready to build some awesome feature :)

Build system commands

All grunt command must be writen to the terminal (cmd on windows) in the root of the cloned directory.

  grunt # check all javascript file for syntax error

  grunt chrome # copy and merge all necessary file to the builds/chrome folder

  grunt test_core # run the unit test on the core

  grunt watch:core # continuous watch the core and test/core folders
                   # and run jslint and unit test on every save
               
  grunt watch:chrome # continuous watch the chrome dependency folders 
                     # and run the chrome command on every save

If these not enough for you check the grunt file it has some others and of course feel free to expand :)

About

Chrome extension for HabitRPG. Uses 3rd party productivity website events to trigger point gain/loss.

https://chrome.google.com/webstore/detail/habitrpg/pidkmpibnnnhneohdgjclfdjpijggmjj?hl=en-US

License:GNU General Public License v3.0


Languages

Language:JavaScript 88.3%Language:HTML 6.1%Language:CSS 5.6%