Getting started

Overview of how to work with the Schedule project.

Installation

Schedule is available through both npm and bower for easy installation. The installation includes all of the files that you will need to use the library. Node.js is required for building, testing, and benchmarking the library.


Using npm:

  $ npm install schedulejs

Using bower (schedule depends on the Later library):

  $ bower install later
  $ bower install schedule

If you would prefer, you can also download the source along with compiled versions of the library in a single zip file. Note that you will need to have Node.js and NPM installed in order to make builds, run tests, or run benchmarks.

Download

Example usage

Schedule works in both the browser (IE7+, FireFox, Chrome, Safari) and Node.js environments. Simply include the library to get access to the Schedule namespace and all functionality.


Node Example

  var schedule = require('schedulejs'),
      tasks = [
          {id:1, duration: 30, resources: ['A']},
          {id:2, duration: 60, resources: ['B']}
        ],
      resources = [
          {id: 'A'},
          {id: 'B'}
      ];

  schedule.create(tasks, resources, null, new Date());

Browser Example

  <!-- Make sure to include the Later library first! -->
  <script src="later.min.js" type="text/javascript"></script>
  <script src="schedule.min.js" type="text/javascript"></script>
  <script type="text/javascript">

  var tasks = [
          {id:1, duration: 30, resources: ['A']},
          {id:2, duration: 60, resources: ['B']}
        ],
      resources = [
          {id: 'A'},
          {id: 'B'}
      ];

  schedule.create(tasks, resources, null, new Date());

  </script>

Building

To build the development and production (minified) versions of Schedule, first make sure that you have installed all of the dependencies. Schedule uses smash to first combine the source files and then uglify to minify it for production.

  $ make all

Running tests

Schedule includes over 70 unit and scenario tests that currently cover over 95% of the codebase. Schedule uses mocha for testing which must be installed prior to running tests.

  $ make test

Benchmarks

There are some basic benchmarks (using benchmarkjs) included in the installation that test the performance of building a dependency tree and generating a schedule. The benchmarks will provide you with an idea of how the library will perform on your hardware.

  $ make benchmark

License

The MIT License (MIT)

Copyright © 2013 BunKat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.