Giter VIP home page Giter VIP logo

quizz's Introduction

quizz

A simple angular-based quizz application

Build pre-requisites

  • Install node.js. node.js now comes with npm. If not, install npm
  • Install grunt
  • Set the CHROME_BIN environment variable pointing to your chrome executable (needed for end-to-end tests) :
    • on OSX : export CHROME_BIN=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

Build

The following commands must all be run from the root directory:

  • npm install: this will install a whole lot of dependencies needed by the grunt tasks. Don't worry if it looks like it downloads the whole internet: that's normal and expected. Until a new task is introduced in the build file, this command must not be run anymore.
  • grunt: this will generate the dist directory, containing an example quizz, as well as the generated JS files, CSS files and JS dependencies (markdown, showdown and angular)

Development

The following commands can be run:

  • grunt server: starts a web server on port 9001, serving the files under src. Can be used to manually test the code before building the application
  • grunt unit: runs the unit tests and watches changes in the files, re-executing tests continuously using Karma and PhantomJS
  • grunt unit-single: runs the unit tests using Karma and PhantomJS
  • grunt e2e: generates the application, and executes end-to-end tests against the generated application in dist

Using the example quizz, and generate new ones

The quizz can be run directly from the file system, or be deployed to a web server.

To create a new quizz, create a new HTML file and JS files inspired by the dist/example.html and dist/js/example-quizz.js files. The default quizz HTML template is based on twitter bootstrap, and is embedded into the files quizz-tmpl.js and its minidied version, quizz-tmpl.min.js. The quizz.js file and its minified version quizz.min.js can be used if you want to write and use your own HTML template. Note that all the browsers won't allow loading the template dynamically when the quizz is served from the file system directly, though. If you want to write your own template and be able to use it from the file system, you'll have to cache it in the JS file, as done in the quizz-tmpl.js file.

quizz's People

Contributors

jnizet avatar cexbrayat avatar clacote avatar

Stargazers

Cédric Levasseur avatar

Watchers

Cédric Levasseur avatar James Cloos 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.