mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
Merge branch 'angular_rewrite' of github.com:lefnire/habitrpg into angular_rewrite
This commit is contained in:
commit
8482439617
3 changed files with 67 additions and 6 deletions
58
README.md
58
README.md
|
|
@ -14,7 +14,7 @@ The general steps are:
|
|||
Or, expressed in commands on the command line:
|
||||
|
||||
1. `git clone --recursive -b angular_rewrite https://github.com/lefnire/habitrpg.git`
|
||||
1. `cd habirpg && npm install`
|
||||
1. `cd habitrpg && npm install`
|
||||
1. `npm start`
|
||||
|
||||
To access the site, open http://localhost:3000 in your browser.
|
||||
|
|
@ -31,3 +31,59 @@ To access the site, open http://localhost:3000 in your browser.
|
|||
1. CoffeeScript. This is the hottest debate. I'm using it to rewrite, and Habit was written originally on CS. It's a
|
||||
fantastic language, but it's a barrier-to-entry for potential contribs who don't know it. Will also revisit right after
|
||||
the rewrite.
|
||||
|
||||
# Windows Environment Install
|
||||
|
||||
1. Set up MongoDB. Steps:
|
||||
1. Download the latest production release of MongoDB from: http://www.mongodb.org/downloads
|
||||
1. Extract the zip file to the desired application directory. Example: c:\apps\mongodb-win32-x86_64-2.4.6
|
||||
1. Rename the folder from mongodb-win32-x86_64-2.4.6 to mongodo
|
||||
1. Create a data\db directory under the application directory. Example: c:\apps\mongodb\data\db
|
||||
1. Start up MongoDB using the following command:
|
||||
'c:\apps\mongodb\bin\mongod.exe --dbpath c:\apps\mongodb\data'
|
||||
|
||||
If MongoDB starts up successfully, you should see the following at the end of the logs:
|
||||
Sun Sep 01 18:10:21.233 [initandlisten] waiting for connections on port 27017
|
||||
Sun Sep 01 18:10:21.233 [websvr] admin web console waiting for connections on po
|
||||
rt 28017
|
||||
|
||||
1. Install Node.js (includes npm). Steps:
|
||||
1. Download and run the latest Node.js msi installation file from http://nodejs.org/download/
|
||||
1. Create a fork of the habitrpg repository on github under your own account
|
||||
1. Install Git and download angular_rewrite code repository. Steps:
|
||||
1. Install latest stable version of Git, found here: http://git-scm.com/downloads
|
||||
1. Make sure to select "Run Git from the Windows Command Prompt" during the installation process
|
||||
1. Open a command window. Navigate to the location where you would like the project files to live. Example: c:\projects
|
||||
1. Run git command to download angular_rewrite branch.
|
||||
'git clone --recursive -b angular_rewrite https://github.com/ezinaz/habitrpg.git' (where 'ezinaz' is your account name)
|
||||
1. Run 'cd habitrpg'
|
||||
1. Create upstream remote:
|
||||
'git remote add upstream https://github.com/lefnire/habitrpg.git'
|
||||
1. Run 'git fetch upstream'
|
||||
1. Run 'npm install'. Read below for possible error message.
|
||||
|
||||
You might receive the following error during the 'npm install' command:
|
||||
> habitrpg@0.0.0-152 postinstall C:\Users\022498\Projects\habitrpg
|
||||
> ./node_modules/bower/bin/bower install -f
|
||||
'.' is not recognized as an internal or external command,
|
||||
operable program or batch file.
|
||||
npm ERR! weird error 1
|
||||
npm ERR! not ok code 0
|
||||
|
||||
Ignore this error and proceed with the following:
|
||||
|
||||
1. Run 'npm install -g nodemon'
|
||||
1. Run 'npm install -g bower'
|
||||
1. Run 'bower install -f'
|
||||
1. Run 'copy config.json.example config.json'
|
||||
1. Run 'npm start'
|
||||
|
||||
Open a browser to URL http://localhost:3000 to test the application.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -105,8 +105,13 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Groups', '$http', 'A
|
|||
}
|
||||
])
|
||||
|
||||
.controller("TavernCtrl", ['$scope', 'Groups',
|
||||
function($scope, Groups) {
|
||||
.controller("TavernCtrl", ['$scope', 'Groups', 'User',
|
||||
function($scope, Groups, User) {
|
||||
$scope.group = Groups.groups.tavern;
|
||||
|
||||
$scope.rest = function(){
|
||||
User.user.flags.rest = !User.user.flags.rest;
|
||||
User.log({op:'set',data:{'flags.rest':User.user.flags.rest}});
|
||||
}
|
||||
}
|
||||
])
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
a(target='_blank', href='http://www.kickstarter.com/profile/2014640723') Daniel
|
||||
| , the bar keep. If you want to rest a while (going on vacation? sudden illness?), I'll set you up at the inn - dailies won't hurt you while you're resting. Stay a while & meet the locals.
|
||||
div
|
||||
button.btn.btn-large.btn-success(ng-class='{active: user.flags.rest}',x-bind='click:toggleResting')
|
||||
button.btn.btn-large.btn-success(ng-class='{active: user.flags.rest}', ng-click='rest()')
|
||||
span(ng-show='user.flags.rest') Check Out of Inn
|
||||
span(ng-hide='user.flags.rest') Rest In The Inn
|
||||
.alert.alert-info(ng-hide='user.flags.rest')
|
||||
.alert.alert-info(ng-show='user.flags.rest')
|
||||
| Whilst resting, your dailies are saved and aren't affected by day turn-over. Whether you check out tomorrow or in a week's time, you'll continue in the same state as when you checked in.
|
||||
.well
|
||||
h3 Resources
|
||||
|
|
|
|||
Loading…
Reference in a new issue