GithubHelp home page GithubHelp logo

preptickets's Introduction

PrepTickets

The full PrepTickets UI

Developer

Setup

Requirements

Things to lookout for

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

Programming

Before starting

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)

Running web server

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/

Compile CoffeeScript

This will be done by sprockets (in ruby) via the web server

Compile SCSS

This will be done by sprockets (in ruby) via the web server

Live Reload

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

Testing

The following has been taken from AngularJS docs

Running unit tests

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)
  • to run or re-run tests just change any of your source or test javascript files

End to end testing

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 or script/e2e-test.bat

Deploying

Rendering required files

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!

preptickets's People

Contributors

anlek avatar jasonlavigne-dev avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.