appirio-tech/arena-web-build

Name: arena-web-build

Owner: Topcoder

Description: Test repository created by Mauricio Desiderio to test build process

Created: 2014-05-20 13:20:56.0

Updated: 2015-05-27 13:37:46.0

Pushed: 2014-05-20 13:21:35.0

Homepage: null

Size: 804

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Arena Web

Overview

[topcoder] Arena for Single Round Match contests. Lightweight html/css/js interface built on angular and bootstrap. Single-page, responsive design approach.

Getting Setup

To develop arena-web you'll need npm (installed as part of node). Then globally install bower and the grunt-cli:

Please execute following under root account or use sudo

install -g bower
install -g grunt-cli

Then clone this repo. Then to get all dependencies simply run:

install
App Structure

Do all development in the app directory. Within that directory:

Configuration

Even though this is a client-side app, we still try to follow 12factor. As such as configuration variables are expected to be set as environment variables. The values will be substituted into the app/js/config.js file on build.

Build and Release

Source the environment variables:

ce config/dev-local.sh

To build the client side app run:

t

This will perform the following tasks:

  1. Clean the build directory.
  2. Populate config.js with the environment variables.
  3. Package all the JS code into a single file using Browserify and put it in build/js/bundle.js.
  4. Package and minify all css code into a single file using the cssmin grunt plugin, and put it in build/css/bundle.css.
  5. Copy all html and image file over to build.

To release the app run:

t release

Release is similar to build, but it works out of the build directory and minifies all the javascript. It copies everything to release.

Run the App

http-server, a simple static webserver, is one of the dev dependencies. To serve the app from the build directory on port 3000 on localhost simply use:

start

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.