Skip to content
Nacereddine edited this page Jun 21, 2013 · 7 revisions

Queen is licensed under Apache License 2.0, a very permissive license (like MIT and BSD).

Setting up a development copy of Queen

These instructions assume that you have experience using a terminal, and have Git and Node.js installed.

  1. If you don't have grunt installed, run npm install -g grunt-cli
  2. Change to the parent directory of where you'd like to install queen
  3. Run git clone git://github.com/turn/queen.git
  4. Change your directory to the new queen folder that is created
  5. Run npm install
  6. Run grunt

Directory Structure and Important Files

  • bin/
    • queen - The command-line executable for Queen
  • build/ - Temporary folder used in building
  • components/ - Bower components (managed by Bower)
  • config/
    • runner.json - Default configuration options for the ./lib/server/runner.js
  • dist/ - Distributable artifacts (can be used to embed Queen in other front-end libraries)
    • queen-monitor.js - Queen's front-end monitoring library
    • queen.js - Queen's front-end capturing library
  • example/ - Examples with instructions on how to run them
  • lib/ - The main source code of Queen
    • client/ - The front-end capturing code
    • monitor/ - The front-end monitoring code
    • server/ - Server code
  • node_modules/ - npm modules (managed by npm)
  • static/ - The root of the static HTTP server started by Queen
    • index.html - Capture page
    • monitor.html - Monitoring page
  • test/ - Tests
  • component.json - Bower configuration file
  • grunt.js - Grunt configuration file
  • index.js - The file that exposes the programmatic API for queen (i.e. what you get when you require('queen'))
  • package.json - npm configuration file

Build Commands

  • grunt - Alias for grunt default
  • grunt default - Cleans, reinstalls bower components, and builds development version of Queen
  • grunt test - Runs grunt default and then runs unit tests
  • grunt build-dev - Builds a development version of Queen (assumes bower components are already installed).
  • grunt build-release - Cleans, reinstalls bower components, builds release version of Queen and drops the artifacts files in to ./dist/.

Build Artifacts

The build commands create artifacts (files) used for the front-end (browser-side) of Queen. Any build command will update these files in the ./static folder. When you perform a dev build, these files will not be minified, when you perform a release build, these files will be minified and also dropped in to the ./dist/ directory.

Interaction Diagram

Queen Diagram

Contributing to Queen

Make sure you document and add relevant tests for your changes, then create a pull request.