This web app is designed to be usable from mobile phones, tablets, or from the desktop.
It is released under the terms of the GNU General Public License, version 3.
- git clone git://github.com/corvec/ncc-web.git
- cd ncc-web
- git submodule init
- git submodule update
To fully be able to build and develop for this project, you will need the following tools:
- git
- Ruby
- Any JavaScript minimizer (I use UglifyJS)
Executing ncc.rb generates index.html, git.html and debug.html. This is partly so that the YAML data file can be parsed into JavaScript objects and partly so that all three files can be maintained. The difference between the files is solely in the JavaScript file that they load.
- index.html loads ncc.min.js
- debug.html loads ncc.js
- git.html loads ncc.js from the git server.
git.html allows you to test just-pushed changes before updating the web-server. Note that for this to use your git server, you must update index.rb. (Yes, I could figure out the server based on .git/config, but I'd have to make assumptions about your configuration).
Compiling this page is simple (command and expected output is below):
~/git/ncc-web$ ruby ncc.rb
index.html generated
debug.html generated
git.html generated
ncc.js is a JavaScript file that simply pulls in the contents of all the JavaScript files below
- js/ncc-init.js contains initialization code.
- js/ncc-keys.js contains key-handling code.
- js/ncc-skills.js contains skill-purchasing code
- js/ncc-prereqs.js contains prereq handling code
- js/ncc-magic.js contains magic handling code - buying spells, switching schools, etc.
- js/ncc-export.js contains code for exporting to PDF, email, and the save link
- js/ncc-info.js contains code used to get and set general info for the character
ncc.min.js is a compiled JavaScript file generated by running
cat js/* | ../UglifyJS/bin/uglifyjs > ncc.min.js
ncc.css contains most of the CSS for this app, but the Noty library has its own CSS as well.
The meat of the game rules for character creation are stored in ncc.yml
The setup for UglifyJS is simple (on an Ubuntu machine, at least). In a command prompt, navigate to the folder where you store git repos (for this example, ~/git).
~/git$ git clone git@github.com:mishoo/UglifyJS.git
~/git$ sudo aptitude install nodejs nodejs-legacy
The author of this application is Corey T Kump. Follow him on Twitter: @CorvecTKump