mirror of
				https://github.com/HabitRPG/habitica.git
				synced 2025-10-30 20:52:29 +01:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 89cf3bf201 | 
							
								
								
									
										2
									
								
								.bowerrc
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								.bowerrc
									
									
									
									
									
								
							| @@ -1,3 +1,3 @@ | ||||
| { | ||||
|   "directory": "website/client-old/bower_components" | ||||
|   "directory": "website/client/bower_components" | ||||
| } | ||||
|   | ||||
| @@ -1,3 +0,0 @@ | ||||
| node_modules | ||||
| .git | ||||
| website | ||||
							
								
								
									
										7
									
								
								.ebextensions/01-increase-timeout.config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								.ebextensions/01-increase-timeout.config
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| option_settings: | ||||
|   - namespace: aws:elasticbeanstalk:command | ||||
|     option_name: Timeout | ||||
|     value: 1800 | ||||
|   - namespace: aws:elb:policies | ||||
|     option_name: ConnectionSettingIdleTimeout | ||||
|     value: 900 | ||||
| @@ -1,20 +1,6 @@ | ||||
| option_settings: | ||||
|   - namespace: aws:elasticbeanstalk:command | ||||
|     option_name: Timeout | ||||
|     value: 1800 | ||||
|   - namespace: aws:elb:policies | ||||
|     option_name: ConnectionSettingIdleTimeout | ||||
|     value: 900 | ||||
| commands: | ||||
|   01_sym_node: | ||||
|   01_sym: | ||||
|     command: "ln -sf $(ls -td /opt/elasticbeanstalk/node-install/node-* | head -1)/bin/node /bin/node" | ||||
| files: | ||||
|   "/opt/elasticbeanstalk/hooks/appdeploy/pre/41update_npm.sh" : | ||||
|     mode: "000775" | ||||
|     owner: root | ||||
|     group: users | ||||
|     content: | | ||||
|       $(ls -td /opt/elasticbeanstalk/node-install/node-* | head -1)/bin/npm install -g npm@4 | ||||
| container_commands: | ||||
|   01_makeBabel: | ||||
|     command: "touch /tmp/.babel.json" | ||||
|   | ||||
| @@ -1,11 +0,0 @@ | ||||
| # top level config | ||||
| root = true | ||||
|  | ||||
| # all files | ||||
| [*] | ||||
| charset = utf-8 | ||||
| end_of_line = lf # Unix-style | ||||
| insert_final_newline = true | ||||
| indent_style = space | ||||
| indent_size = 2 | ||||
| trim_trailing_whitespace = true | ||||
| @@ -1,20 +1,35 @@ | ||||
| # Compiled and vendored files | ||||
| common/dist/ | ||||
| common/transpiled-babel/ | ||||
| coverage/ | ||||
| database_reports/ | ||||
| website/build/ | ||||
| website/transpiled-babel/ | ||||
| website/common/transpiled-babel/ | ||||
| dist/ | ||||
| dist-client/ | ||||
|  | ||||
| # Not linted | ||||
| website/client-old/ | ||||
| test/client-old/spec/**/* | ||||
|  | ||||
| # Temporarilly disabled. These should be removed when the linting errors are fixed TODO | ||||
| migrations/* | ||||
|  | ||||
| # The files in website/client/js should be moved out and browserified | ||||
| website/client/ | ||||
|  | ||||
| # Temporarilly disabled. These should be removed when the linting errors are fixed | ||||
| common/script/content/index.js | ||||
| common/script/public/**/*.js | ||||
|  | ||||
| website/server/**/api-v2/**/*.js | ||||
| website/server/routes/payments.js | ||||
| website/server/routes/pages.js | ||||
| website/server/middlewares/apiThrottle.js | ||||
| website/server/middlewares/forceRefresh.js | ||||
|  | ||||
| debug-scripts/* | ||||
| scripts/* | ||||
| website/common/browserify.js | ||||
| Gruntfile.js | ||||
| tasks/*.js | ||||
| gulpfile.js | ||||
| gulp | ||||
| Gruntfile.js | ||||
| newrelic.js | ||||
|  | ||||
| test/api-legacy/**/* | ||||
| test/common/simulations/**/* | ||||
| test/content/**/* | ||||
| test/server_side/**/* | ||||
| test/spec/**/* | ||||
|   | ||||
							
								
								
									
										11
									
								
								.eslintrc
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								.eslintrc
									
									
									
									
									
								
							| @@ -1,10 +1,9 @@ | ||||
| { | ||||
|   "root": true, | ||||
|   "env": { | ||||
|     "node": true, | ||||
|   }, | ||||
|   "extends": [ | ||||
|     "habitrpg", | ||||
|     "habitrpg/esnext" | ||||
|     "habitrpg/server", | ||||
|     "habitrpg/babel" | ||||
|   ], | ||||
|   "globals": { | ||||
|     "Promise": true | ||||
|   } | ||||
| } | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/CONTRIBUTING.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/CONTRIBUTING.md
									
									
									
									
										vendored
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| # Reporting Bugs | ||||
|  | ||||
| [Please see these instructions for reporting bugs](https://github.com/HabitRPG/habitica/issues/2760) | ||||
| [Please see these instructions for reporting bugs](https://github.com/HabitRPG/habitrpg/issues/2760) | ||||
|  | ||||
| # Pull Request | ||||
|  | ||||
|   | ||||
							
								
								
									
										14
									
								
								.github/ISSUE_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/ISSUE_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							| @@ -1,19 +1,21 @@ | ||||
| [//]: # (Before logging this issue, please post to the Report a Bug guild from the Habitica website's Help menu. Most bugs can be handled quickly there. If a GitHub issue is needed, you will be advised of that by a moderator or staff member -- a player with a dark blue or purple name. It is recommended that you don't create a new issue unless advised to.) | ||||
| [//]: # (Before logging this issue, look through common problems at https://github.com/HabitRPG/habitrpg/issue If you find your issue there, read at least the first post to see if there is a workaround for you) | ||||
|  | ||||
| [//]: # (Bugs in the mobile apps can also be reported there.) | ||||
| [//]: # (Github is primarily used for reporting bugs. If you have a feature request, use "Help > Request a Feature" so that the feature request can be vetted by the larger Habitica community) | ||||
|  | ||||
| [//]: # (If you have a feature request, use "Help > Request a Feature", not GitHub or the Report a Bug guild.) | ||||
| [//]: # (To report a bug in one of the mobile apps, please report it in the correct repository. Android: https://github.com/HabitRPG/habitrpg-android, iOS: https://github.com/HabitRPG/habitrpg-ios) | ||||
|  | ||||
| [//]: # (For more guidelines see https://github.com/HabitRPG/habitica/issues/2760) | ||||
| [//]: # (For more guidelines see https://github.com/HabitRPG/habitrpg/issues/2760) | ||||
|  | ||||
| [//]: # (Fill out relevant information - UUID is found in Settings -> API) | ||||
| ### General Info | ||||
| General Info | ||||
|   * UUID:  | ||||
|   * Browser:  | ||||
|   * OS:  | ||||
|  | ||||
| ### Description | ||||
| [//]: # (Describe bug in detail here. Include screenshots if helpful.) | ||||
| [//]: # (Describe bug in detail here. Include pictures if helpful.) | ||||
|  | ||||
|  | ||||
|  | ||||
| #### Console Errors | ||||
| [//]: # (Include any JavaScript console errors here.) | ||||
|   | ||||
							
								
								
									
										1
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							| @@ -9,6 +9,5 @@ Fixes put_issue_url_here | ||||
|  | ||||
|  | ||||
| [//]: # (Put User ID in here - found in Settings -> API) | ||||
|  | ||||
| ---- | ||||
| UUID:  | ||||
|   | ||||
							
								
								
									
										25
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,19 +1,18 @@ | ||||
| .DS_Store | ||||
| website/client-old/gen | ||||
| website/client-old/common | ||||
| website/client-old/apidoc | ||||
| website/client-old/js/habitrpg-shared.js* | ||||
| website/client-old/css/habitrpg-shared.css | ||||
| website/client/gen | ||||
| website/client/common | ||||
| website/client/apidoc | ||||
| website/transpiled-babel/ | ||||
| website/common/transpiled-babel/ | ||||
| common/transpiled-babel/ | ||||
| node_modules | ||||
| *.swp | ||||
| .idea* | ||||
| config.json | ||||
| npm-debug.log* | ||||
| lib | ||||
| website/client-old/bower_components | ||||
| website/client-old/new-stuff.html | ||||
| website/client/bower_components | ||||
| website/client/new-stuff.html | ||||
| website/build | ||||
| newrelic_agent.log | ||||
| .bower-tmp | ||||
| .bower-registry | ||||
| @@ -26,16 +25,14 @@ src/*/*.map | ||||
| src/*/*/*.map | ||||
| test/*.js | ||||
| test/*.map | ||||
| website/client-old/docs | ||||
| website/client/docs | ||||
| *.sublime-workspace | ||||
| coverage | ||||
| coverage.html | ||||
| common/dist/scripts/* | ||||
| dist | ||||
| dist-client | ||||
| test/client/unit/coverage | ||||
| test/client/e2e/reports | ||||
| test/client-old/spec/mocks/translations.js | ||||
| common/dist/sprites/habitrpg-shared.css | ||||
|  | ||||
| test/spec/mocks/translations.js | ||||
|  | ||||
| # Elastic Beanstalk Files | ||||
| .elasticbeanstalk/* | ||||
|   | ||||
| @@ -2,12 +2,9 @@ node_modules/** | ||||
| .bower-cache/** | ||||
| .bower-tmp/** | ||||
| .bower-registry/** | ||||
| website/client-old/** | ||||
| website/client/** | ||||
| website/views/** | ||||
| website/build/** | ||||
| dist/** | ||||
| test/** | ||||
| .git/** | ||||
| Gruntfile.js | ||||
| CHANGELOG.md | ||||
|   | ||||
							
								
								
									
										43
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								.travis.yml
									
									
									
									
									
								
							| @@ -1,36 +1,17 @@ | ||||
| language: node_js | ||||
| node_js: | ||||
|   - '6' | ||||
| sudo: required | ||||
| addons: | ||||
|   apt: | ||||
|     sources: | ||||
|       - ubuntu-toolchain-r-test | ||||
|     packages: | ||||
|       - g++-4.8 | ||||
|   - '4.3.1' | ||||
| before_install: | ||||
|   - $CXX --version | ||||
|   - npm install -g npm@4 | ||||
|   - if [ $REQUIRES_SERVER ]; then sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10; echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list; sudo apt-get update; sudo apt-get install mongodb-org-server; fi | ||||
| install: | ||||
|   - npm install &> npm.install.log || (cat npm.install.log; false) | ||||
|   - "npm install -g npm@3" | ||||
|   - "npm install -g gulp" | ||||
|   - "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10" | ||||
|   - "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list" | ||||
|   - "sudo apt-get update" | ||||
|   - "sudo apt-get install mongodb-org-server" | ||||
| before_script: | ||||
|   - npm run test:build | ||||
|   - 'npm install -g grunt-cli mocha' | ||||
|   - cp config.json.example config.json | ||||
|   - if [ $REQUIRES_SERVER ]; then until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done; export DISPLAY=:99; fi | ||||
| script: | ||||
|   - npm run $TEST | ||||
|   - if [ $COVERAGE ]; then ./node_modules/.bin/lcov-result-merger 'coverage/**/*.info' | ./node_modules/coveralls/bin/coveralls.js; fi | ||||
| env: | ||||
|   global: | ||||
|     - CXX=g++-4.8 | ||||
|     - DISABLE_REQUEST_LOGGING=true | ||||
|   matrix: | ||||
|     - TEST="lint" | ||||
|     - TEST="test:api-v3" REQUIRES_SERVER=true COVERAGE=true | ||||
|     - TEST="test:sanity" | ||||
|     - TEST="test:content" COVERAGE=true | ||||
|     - TEST="test:common" COVERAGE=true | ||||
|     - TEST="test:karma" COVERAGE=true | ||||
|     - TEST="client:unit" COVERAGE=true | ||||
|     - TEST="apidoc" | ||||
|   - "until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done" | ||||
|   - "export DISPLAY=:99" | ||||
| after_script: | ||||
|   - "./node_modules/.bin/lcov-result-merger 'coverage/**/*.info' | ./node_modules/coveralls/bin/coveralls.js" | ||||
|   | ||||
							
								
								
									
										36
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								Dockerfile
									
									
									
									
									
								
							| @@ -1,16 +1,40 @@ | ||||
| FROM node:boron | ||||
| FROM ubuntu:trusty | ||||
|  | ||||
| MAINTAINER Sabe Jones <sabe@habitica.com> | ||||
|  | ||||
| # Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start. | ||||
| RUN echo -e '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d | ||||
|  | ||||
| # Install prerequisites | ||||
| RUN apt-get update | ||||
| RUN apt-get install -y \ | ||||
|     build-essential \ | ||||
|     curl \ | ||||
|     git \ | ||||
|     libfontconfig1 \ | ||||
|     libfreetype6 \ | ||||
|     libkrb5-dev \ | ||||
|     python | ||||
|  | ||||
| # Install NodeJS | ||||
| RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | ||||
| RUN apt-get install -y nodejs | ||||
|  | ||||
| # Clean up package management | ||||
| RUN apt-get clean | ||||
| RUN rm -rf /var/lib/apt/lists/* | ||||
|  | ||||
| # Install global packages | ||||
| RUN npm install -g gulp grunt-cli bower mocha | ||||
| RUN npm install -g gulp grunt-cli bower | ||||
|  | ||||
| # Clone Habitica repo and install dependencies | ||||
| RUN mkdir -p /usr/src/habitrpg | ||||
| WORKDIR /usr/src/habitrpg | ||||
| RUN git clone https://github.com/HabitRPG/habitica.git /usr/src/habitrpg | ||||
| WORKDIR /habitrpg | ||||
| RUN git clone https://github.com/HabitRPG/habitrpg.git /habitrpg | ||||
| RUN npm install | ||||
| RUN bower install --allow-root | ||||
|  | ||||
| # Create Build dir | ||||
| # Create environment config file and build directory | ||||
| RUN cp config.json.example config.json | ||||
| RUN mkdir -p ./website/build | ||||
|  | ||||
| # Start Habitica | ||||
|   | ||||
							
								
								
									
										65
									
								
								Gruntfile.js
									
									
									
									
									
								
							
							
						
						
									
										65
									
								
								Gruntfile.js
									
									
									
									
									
								
							| @@ -9,10 +9,10 @@ module.exports = function(grunt) { | ||||
|  | ||||
|     karma: { | ||||
|       unit: { | ||||
|         configFile: 'test/client-old/spec/karma.conf.js' | ||||
|         configFile: 'karma.conf.js' | ||||
|       }, | ||||
|       continuous: { | ||||
|         configFile: 'test/client-old/spec/karma.conf.js', | ||||
|         configFile: 'karma.conf.js', | ||||
|         singleRun: true, | ||||
|         autoWatch: false | ||||
|       } | ||||
| @@ -28,11 +28,11 @@ module.exports = function(grunt) { | ||||
|           report: 'gzip' | ||||
|         }, | ||||
|         files:{ | ||||
|           "website/client-old/css/habitrpg-shared.css": [ | ||||
|             "website/assets/sprites/dist/spritesmith*.css", | ||||
|             "website/assets/sprites/css/backer.css", | ||||
|             "website/assets/sprites/css/Mounts.css", | ||||
|             "website/assets/sprites/css/index.css" | ||||
|           "common/dist/sprites/habitrpg-shared.css": [ | ||||
|             "common/dist/sprites/spritesmith*.css", | ||||
|             "common/css/backer.css", | ||||
|             "common/css/Mounts.css", | ||||
|             "common/css/index.css" | ||||
|           ] | ||||
|         } | ||||
|       } | ||||
| @@ -43,11 +43,11 @@ module.exports = function(grunt) { | ||||
|         options: { | ||||
|           compress: false, // AFTER | ||||
|           'include css': true, | ||||
|           paths: ['website/client-old'] | ||||
|           paths: ['website/client'] | ||||
|         }, | ||||
|         files: { | ||||
|           'website/build/app.css': ['website/client-old/css/index.styl'], | ||||
|           'website/build/static.css': ['website/client-old/css/static.styl'] | ||||
|           'website/build/app.css': ['website/client/css/index.styl'], | ||||
|           'website/build/static.css': ['website/client/css/static.styl'] | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
| @@ -55,13 +55,13 @@ module.exports = function(grunt) { | ||||
|     copy: { | ||||
|       build: { | ||||
|         files: [ | ||||
|           {expand: true, cwd: 'website/client-old/', src: 'favicon.ico', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: 'website/client-old/', src: 'favicon_192x192.png', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: 'website/assets/sprites/dist/', src: 'spritesmith*.png', dest: 'website/build/static/sprites'}, | ||||
|           {expand: true, cwd: 'website/assets/sprites/', src: 'backer-only/*.gif', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: 'website/assets/sprites/', src: 'npc_ian.gif', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: 'website/assets/sprites/', src: 'quest_*.gif', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: 'website/client-old/', src: 'bower_components/bootstrap/dist/fonts/*', dest: 'website/build/'} | ||||
|           {expand: true, cwd: 'website/client/', src: 'favicon.ico', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: 'website/client/', src: 'favicon_192x192.png', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: '', src: 'common/dist/sprites/spritesmith*.png', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: '', src: 'common/img/sprites/backer-only/*.gif', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: '', src: 'common/img/sprites/npc_ian.gif', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: '', src: 'common/img/sprites/quest_*.gif', dest: 'website/build/'}, | ||||
|           {expand: true, cwd: 'website/client/', src: 'bower_components/bootstrap/dist/fonts/*', dest: 'website/build/'} | ||||
|         ] | ||||
|       } | ||||
|     }, | ||||
| @@ -77,9 +77,10 @@ module.exports = function(grunt) { | ||||
|           'website/build/*.css', | ||||
|           'website/build/favicon.ico', | ||||
|           'website/build/favicon_192x192.png', | ||||
|           'website/build/*.png', | ||||
|           'website/build/static/sprites/*.png', | ||||
|           'website/build/*.gif', | ||||
|           'website/build/common/dist/sprites/*.png', | ||||
|           'website/build/common/img/sprites/backer-only/*.gif', | ||||
|           'website/build/common/img/sprites/npc_ian.gif', | ||||
|           'website/build/common/img/sprites/quest_*.gif', | ||||
|           'website/build/bower_components/bootstrap/dist/fonts/*' | ||||
|         ], | ||||
|         dest: 'website/build/*.css' | ||||
| @@ -87,9 +88,9 @@ module.exports = function(grunt) { | ||||
|     } | ||||
|   }); | ||||
|  | ||||
|   //Load build files from client-old/manifest.json | ||||
|   grunt.registerTask('loadManifestFiles', 'Load all build files from client-old/manifest.json', function(){ | ||||
|     var files = grunt.file.readJSON('./website/client-old/manifest.json'); | ||||
|   //Load build files from client/manifest.json | ||||
|   grunt.registerTask('loadManifestFiles', 'Load all build files from client/manifest.json', function(){ | ||||
|     var files = grunt.file.readJSON('./website/client/manifest.json'); | ||||
|     var uglify = {}; | ||||
|     var cssmin = {}; | ||||
|  | ||||
| @@ -100,7 +101,7 @@ module.exports = function(grunt) { | ||||
|       _.each(files[key].js, function(val){ | ||||
|         var path = "./"; | ||||
|         if( val.indexOf('common/') == -1) | ||||
|           path = './website/client-old/'; | ||||
|           path = './website/client/'; | ||||
|         js.push(path + val); | ||||
|       }); | ||||
|  | ||||
| @@ -109,7 +110,7 @@ module.exports = function(grunt) { | ||||
|       _.each(files[key].css, function(val){ | ||||
|         var path = "./"; | ||||
|         if( val.indexOf('common/') == -1) { | ||||
|           path = (val == 'app.css' || val == 'static.css') ?  './website/build/' : './website/client-old/'; | ||||
|           path = (val == 'app.css' || val == 'static.css') ?  './website/build/' : './website/client/'; | ||||
|         } | ||||
|         css.push(path + val) | ||||
|       }); | ||||
| @@ -121,13 +122,21 @@ module.exports = function(grunt) { | ||||
|  | ||||
|     grunt.config.set('cssmin.build.files', cssmin); | ||||
|     // Rewrite urls to relative path | ||||
|     grunt.config.set('cssmin.build.options', {'target': 'website/client-old/css/whatever-css.css'}); | ||||
|     grunt.config.set('cssmin.build.options', {'target': 'website/client/css/whatever-css.css'}); | ||||
|   }); | ||||
|  | ||||
|   // Register tasks. | ||||
|   grunt.registerTask('build:prod', ['loadManifestFiles', 'clean:build', 'uglify', 'stylus', 'cssmin', 'copy:build', 'hashres']); | ||||
|   grunt.registerTask('build:dev', ['cssmin', 'stylus']); | ||||
|   grunt.registerTask('build:test', ['build:dev']); | ||||
|   grunt.registerTask('build:test', ['test:prepare:translations', 'build:dev']); | ||||
|  | ||||
|   grunt.registerTask('test:prepare:translations', function() { | ||||
|     var i18n  = require('./website/server/libs/api-v3/i18n'), | ||||
|         fs    = require('fs'); | ||||
|     fs.writeFileSync('test/spec/mocks/translations.js', | ||||
|       "if(!window.env) window.env = {};\n" + | ||||
|       "window.env.translations = " + JSON.stringify(i18n.translations['en']) + ';'); | ||||
|   }); | ||||
|  | ||||
|   // Load tasks | ||||
|   grunt.loadNpmTasks('grunt-contrib-uglify'); | ||||
| @@ -137,6 +146,6 @@ module.exports = function(grunt) { | ||||
|   grunt.loadNpmTasks('grunt-contrib-copy'); | ||||
|   grunt.loadNpmTasks('grunt-contrib-watch'); | ||||
|   grunt.loadNpmTasks('grunt-hashres'); | ||||
|   if (process.env.NODE_ENV !== 'production') grunt.loadNpmTasks('grunt-karma'); | ||||
|   grunt.loadNpmTasks('grunt-karma'); | ||||
|  | ||||
| }; | ||||
|   | ||||
							
								
								
									
										7
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								LICENSE
									
									
									
									
									
								
							| @@ -2,9 +2,8 @@ | ||||
| This Source Code is subject to the terms of the GNU General Public License, v. 3.0. | ||||
| If a copy of the GPL was not distributed with this file, You can obtain one at http://www.gnu.org/licenses/gpl-3.0.txt | ||||
|  | ||||
| * Assets and content designed for Mozilla BrowserQuest are licensed under CC-BY-SA 3.0: | ||||
| * Assets and content designed for Mozilla BrowserQuest is licensed under CC-BY-SA 3.0: | ||||
| http://creativecommons.org/licenses/by-sa/3.0/ | ||||
|  | ||||
| * Assets and content designed for HabitRPG are licensed under CC-BY-NC-SA 3.0: | ||||
| http://creativecommons.org/licenses/by-nc-sa/3.0/ | ||||
|  | ||||
| * Assets and content designed for HabitRPG is licensed under CC-BY-NC-SA 3.0: | ||||
| http://creativecommons.org/licenses/by-nc-sa/3.0/ | ||||
							
								
								
									
										25
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,11 +1,30 @@ | ||||
| Habitica [](https://travis-ci.org/HabitRPG/habitica) [](https://codeclimate.com/github/HabitRPG/habitrpg) [](https://coveralls.io/github/HabitRPG/habitica?branch=develop) [](https://www.bountysource.com/trackers/68393-habitrpg?utm_source=68393&utm_medium=shield&utm_campaign=TRACKER_BADGE) | ||||
| Habitica [](https://travis-ci.org/HabitRPG/habitrpg) [](https://codeclimate.com/github/HabitRPG/habitrpg) [](https://coveralls.io/r/HabitRPG/habitrpg?branch=develop) [](https://www.bountysource.com/trackers/68393-habitrpg?utm_source=68393&utm_medium=shield&utm_campaign=TRACKER_BADGE) | ||||
| =============== | ||||
|  | ||||
| [Habitica](https://habitica.com) is an open source habit building program which treats your life like a Role Playing Game. Level up as you succeed, lose HP as you fail, earn money to buy weapons and armor. | ||||
|  | ||||
| We need more programmers! Your assistance will be greatly appreciated. | ||||
|  | ||||
| For an introduction to the technologies used and how the software is organized, refer to [Guidance for Blacksmiths](http://habitica.wikia.com/wiki/Guidance_for_Blacksmiths). | ||||
| For an introduction to the technologies used and how the software is organized, refer to [Contributing to Habitica](http://habitica.wikia.com/wiki/Contributing_to_Habitica#Coders_.28Web_.26_Mobile.29) - "Coders (Web & Mobile)" section. | ||||
|  | ||||
| To set up a local install of Habitica for development and testing on various platforms, see [Setting up Habitica Locally](http://habitica.wikia.com/wiki/Setting_up_Habitica_Locally). | ||||
| To set up a local install of Habitica for development and testing, see [Setting up Habitica Locally](http://habitica.wikia.com/wiki/Setting_up_Habitica_Locally), which contains instructions for Windows, *nix / Mac OS, and Vagrant. | ||||
|  | ||||
| Then read [Guidance for Blacksmiths](http://habitica.wikia.com/wiki/Guidance_for_Blacksmiths) for additional instructions and useful tips. | ||||
|  | ||||
| ## Debug Scripts | ||||
|  | ||||
| In the `./debug-scripts/` folder, there are a few files. Here's a sample: | ||||
|  | ||||
| ```bash | ||||
| grant-all-equipment.js | ||||
| grant-all-mounts.js | ||||
| grant-all-pets.js | ||||
| ``` | ||||
|  | ||||
| You can run them by doing: | ||||
|  | ||||
| ```bash | ||||
| node debug-scripts/name-of-script.js | ||||
| ``` | ||||
|  | ||||
| If there are more arguments required to make the script work, it will print out the usage and an explanation of what the script does. | ||||
|   | ||||
| @@ -6,7 +6,7 @@ VAGRANTFILE_API_VERSION = "2" | ||||
|  | ||||
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||||
|   config.vm.provider "virtualbox" do |v| | ||||
|     v.memory = 4096 | ||||
|     v.memory = 768 | ||||
|     v.cpus = 1 | ||||
|     v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"] | ||||
|   end | ||||
|   | ||||
							
								
								
									
										14
									
								
								bower.json
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								bower.json
									
									
									
									
									
								
							| @@ -9,12 +9,13 @@ | ||||
|   "ignore": [ | ||||
|     "**/.*", | ||||
|     "node_modules", | ||||
|     "website/client-old/bower_components", | ||||
|     "website/client/bower_components", | ||||
|     "test", | ||||
|     "tests" | ||||
|   ], | ||||
|   "dependencies": { | ||||
|     "Angular-At-Directive": "snicker/Angular-At-Directive#c27bae207aa06d1e", | ||||
|     "BrowserQuest": "browserquest/BrowserQuest#c3a960b03031dad5d", | ||||
|     "angular": "1.3.9", | ||||
|     "angular-bootstrap": "0.13.0", | ||||
|     "angular-filter": "0.5.1", | ||||
| @@ -30,21 +31,18 @@ | ||||
|     "bootstrap-tour": "0.10.1", | ||||
|     "css-social-buttons": "samcollins/css-social-buttons#v1.1.1 ", | ||||
|     "github-buttons": "mdo/github-buttons#v3.0.0", | ||||
|     "hello": "1.14.1", | ||||
|     "hello": "1.5.0", | ||||
|     "jquery": "2.1.0", | ||||
|     "jquery-colorbox": "1.4.36", | ||||
|     "jquery-ui": "1.10.3", | ||||
|     "jquery.cookie": "1.4.0", | ||||
|     "js-emoji": "snicker/js-emoji#f25d8a303f", | ||||
|     "ngInfiniteScroll": "1.1.0", | ||||
|     "ngInfiniteScroll": "1.0.0", | ||||
|     "pnotify": "1.3.1", | ||||
|     "sticky": "1.0.3", | ||||
|     "sticky": "*", | ||||
|     "swagger-ui": "wordnik/swagger-ui#v2.0.24", | ||||
|     "smart-app-banner": "78ef9c0679723b25be1a0ae04f7b4aef7cbced4f", | ||||
|     "habitica-markdown": "1.2.2", | ||||
|     "pusher-js-auth": "^2.0.0", | ||||
|     "pusher-websocket-iso": "pusher#^3.2.0", | ||||
|     "taggle": "^1.11.1" | ||||
|     "habitica-markdown": "^1.1.0" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "angular-mocks": "1.3.9" | ||||
|   | ||||
							
								
								
									
										4
									
								
								common/.eslintrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								common/.eslintrc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
|   "extends": "habitrpg/browser" | ||||
| } | ||||
|  | ||||
							
								
								
									
										16
									
								
								common/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								common/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| # Common | ||||
|  | ||||
| Shared resources useful for the multiple Habitica repositories, that way all the repositories remain in-sync with common characteristics. Includes things like: | ||||
|  | ||||
|  * Assets - sprites, images, etc | ||||
|  * CSS - especially, esp. sprite-sheet mapping | ||||
|  * Algorithms - level up algorithm, scoring functions, etc | ||||
|  * View helper functions that may come in handy for multiple client MVCs | ||||
|  * Item definitions - weapons, armor, pets  | ||||
|  | ||||
| ## Compiling spritesheets | ||||
| Because of some wonkiness with Heroku, the spritesheet compilation is not part of the production build process and must be done manually when new images are added by running:  | ||||
|  | ||||
| ``` bash | ||||
| npm run sprites | ||||
| ``` | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user