The full PrepTickets UI
-
npm install -g bower
-
Install:
npm install -g coffee-script
-
Install:
gem install bundler
NEVER EDIT COMPILED JAVASCRIPT FILES
CoffeeScript compiles to JS, but it will overwrite any changes done to the compiled JS. You can tell a file has been compiled by CoffeeScript by the first line saying:
// Generated by CoffeeScript 1.6.3
To improve ease of programming, we've used Ruby to speedup building. Before you can start programming, you need to make sure you have the required gems by running this command (in the root
of the project):
bundle install
This will go and download all the requirements (you might need to do this every time new code gets pulled and the Gemfile or Gemfile.lock is changed)
To view the project in your browser, run this command (from the root
directory):
bundle exec rackup
Then you can visit the project at http://localhost:8000/
This will be done by sprockets (in ruby) via the web server
This will be done by sprockets (in ruby) via the web server
To speed up development and prevent the developer from hitting reload
everytime s/he changes some code, we've implemented live reload [readme]
To get live-reload running, just start running guard (in the root
directory):
bundle exec guard
Once guard is running, you will see that any time you save a file in the /app
directory, it will report a change and your browser (in the background) will reload.
To exit guard, just type exit
in the guard terminal window
The following has been taken from AngularJS docs
We recommend using jasmine and Karma for your unit tests/specs, but you are free to use whatever works for you.
Requires node.js, Karma (sudo npm install -g karma
) and a local
or remote browser.
- start
scripts/test.sh
(on windows:scripts\test.bat
)- a browser will start and connect to the Karma server (Chrome is default browser, others can be captured by loading the same url as the one in Chrome or by changing the
config/karma.conf.js
file)
- a browser will start and connect to the Karma server (Chrome is default browser, others can be captured by loading the same url as the one in Chrome or by changing the
- to run or re-run tests just change any of your source or test javascript files
Angular ships with a baked-in end-to-end test runner that understands angular, your app and allows you to write your tests with jasmine-like BDD syntax.
Requires a webserver, node.js + ./scripts/web-server.js
or your backend server that hosts the angular static files.
Check out the end-to-end runner's documentation for more info.
- create your end-to-end tests in
test/e2e/scenarios.js
- serve your project directory with your http/backend server or node.js +
scripts/web-server.js
- to run do one of:
- open
http://localhost:port/test/e2e/runner.html
in your browser - run the tests from console with Karma via
scripts/e2e-test.sh
orscript/e2e-test.bat
- open
It's very simple to build the application for production, simple run the fullying command (in the root directory)
bundle exec rake build
This will take a few moments to compile the project and write it to the /build
directory (in the root directory)
The build directory will contain everything you need to run the app, just upload the contents of the build directory to a server and you're ready to go!