2013-11-10 01:30:24 +00:00
[](https://travis-ci.org/HabitRPG/habitrpg-shared)
2013-08-27 01:54:08 +00:00
Shared resources useful for the multiple HabitRPG repositories, that way all the repositories remain in-sync with common characteristics. Includes things like:
2013-03-12 21:46:36 +00:00
* Assets - sprites, images, etc
* CSS - especially, esp. sprite-sheet mapping
* Algorithms - level up algorithm, scoring functions, etc
2013-08-27 02:33:56 +00:00
* View helper functions that may come in handy for multiple client MVCs
2013-05-15 14:08:35 +00:00
* Item definitions - weapons, armor, pets
2013-03-12 21:41:32 +00:00
2013-03-12 21:46:36 +00:00
##Installation
2013-08-27 01:54:08 +00:00
* `npm install`
2013-08-27 02:33:56 +00:00
* `grunt` - after you've made modifications and want to compile the dist files for browser
2013-05-17 02:30:19 +00:00
* Node.js
2013-05-24 05:29:04 +00:00
* `require ('coffee-script')`
2013-08-27 02:33:56 +00:00
* `require('./script/algos.coffee')` , `require('./script/helpers.coffee')` , etc.
2013-05-24 05:29:04 +00:00
* Browser
2013-08-27 01:54:08 +00:00
* Use `<script/>` tag to include ./dist/habitrpg-shared.js it will export `window.habitrpgShared` object.
* // Use `browser.debug.js' if you want to have sourcemaps. - EDIT: Only one file now, and it has sourcemaps. Fix this
2013-05-24 05:29:04 +00:00
2013-05-15 14:08:35 +00:00
* Note how to invoke scoring function:
2013-08-27 02:33:56 +00:00
* `algos.score(user, task, direction)` , etc
* TODO document all the functions
2013-04-10 19:00:40 +00:00
2013-11-01 01:07:19 +00:00
##Tests
* `npm install`
2013-04-10 19:00:40 +00:00
##CSS
2013-08-27 01:54:08 +00:00
Shared CSS between the website and the mobile app is a fuzzy area. Spritesheets definitely go in habitrpg-shared (since mobile
uses them too). Other things, like customizer buttons, *may* want to go here? As you find sharable components, (1) move them
2013-08-27 02:33:56 +00:00
from the website into habitrpg-shared, (2) remove from website & make sure all html/css references are updated.
Currently, all or most spritesheets are available. They're in css/*.css, but that's not what you want. You want `/spritesheets.css`
which is the concat'd file (using `grunt` ) which includes all the spritesheets. I'd prefer this be in /dist/spritesheets.css
for consistency, but it's having image referencing weirdness