diff --git a/Jakefile.js b/Jakefile.js index b2bf4433..25f329ff 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -11,24 +11,22 @@ require('jake-utils'); * default task */ desc('Execute all tasks: build all libraries'); -task('default', ['timeline'], function () { +task('default', ['vis'], function () { console.log('done'); }); /** - * timeline + * vis.js, vis.css */ -desc('Build the timeline visualization'); -task('timeline', function () { - var TIMELINE = './bin/timeline/timeline.js'; - var TIMELINE_MIN = './bin/timeline/timeline.min.js'; - var DIR = './bin/timeline'; - jake.rmRf(DIR); - jake.mkdirP(DIR); +desc('Build the visualization library vis.js'); +task('vis', function () { + var VIS = './vis.js'; + var VIS_MIN = './vis.min.js'; + var VIS_CSS = './vis.css'; // concatenate the script files concat({ - dest: TIMELINE, + dest: VIS, src: [ './src/header.js', './src/util.js', @@ -46,7 +44,7 @@ task('timeline', function () { './src/component/itemset.js', './src/component/item/*.js', - './src/visualization/timeline/timeline.js', + './src/visualization/timeline.js', './lib/moment.js' ], @@ -55,7 +53,7 @@ task('timeline', function () { // concatenate the css files concat({ - dest: './bin/timeline/timeline.css', + dest: VIS_CSS, src: [ './src/component/css/panel.css', './src/component/css/item.css', @@ -66,16 +64,16 @@ task('timeline', function () { // minify javascript minify({ - src: TIMELINE, - dest: TIMELINE_MIN, + src: VIS, + dest: VIS_MIN, header: read('./src/header.js') }); // update version number and stuff in the javascript files - [TIMELINE, TIMELINE_MIN].forEach(function (file) { + [VIS, VIS_MIN].forEach(function (file) { replace({ replacements: [ - {pattern: '@@name', replacement: 'timeline'}, + {pattern: '@@name', replacement: 'vis.js'}, {pattern: '@@date', replacement: today()}, {pattern: '@@version', replacement: version()} ], @@ -83,10 +81,7 @@ task('timeline', function () { }); }); - // copy examples - jake.cpR('./src/visualization/timeline/examples', './bin/timeline/examples/'); - - console.log('created timeline library'); + console.log('created vis.js library'); }); /** diff --git a/README.md b/README.md index 66480007..59bb785c 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,11 @@ Or download the library from the github project: ## Load -To use a component, include the javascript and css file of the component -in your webpage. For example for the Timeline: +To use a component, include the javascript and css file of vis in your webpage. ```html - - + + ``` A timeline can be instantiated as: @@ -45,15 +44,16 @@ component. ## Example A basic example on loading a Timeline is shown below. More examples can be -found in the examples directories of each component. +found in the [examples directory](https://github.com/almende/vis/tree/master/examples) +of the project. ```html