From 421e338b30417d3f9c4210ddffc07b37bb3d809a Mon Sep 17 00:00:00 2001 From: josdejong Date: Tue, 14 Jan 2014 16:17:16 +0100 Subject: [PATCH 01/10] Some fixes in the build script and tests --- Jakefile.js | 17 ++++++++++------- README.md | 8 ++------ package.json | 3 ++- test/dataset.js | 2 +- test/dataview.js | 2 +- test/eventbus.js | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Jakefile.js b/Jakefile.js index 5aabf9a1..f24b9566 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -9,16 +9,17 @@ var jake = require('jake'), require('jake-utils'); // constants -var VIS = './dist/vis.js'; -var VIS_CSS = './dist/vis.css'; -var VIS_TMP = './vis.js.tmp'; -var VIS_MIN = './dist/vis.min.js'; +var DIST = './dist'; +var VIS = DIST + '/vis.js'; +var VIS_CSS = DIST + '/vis.css'; +var VIS_TMP = DIST + '/vis.js.tmp'; +var VIS_MIN = DIST + '/vis.min.js'; /** * default task */ -desc('Execute all tasks: build all libraries'); -task('default', ['build', 'minify', 'test'], function () { +desc('Default task: build all libraries'); +task('default', ['build', 'minify'], function () { console.log('done'); }); @@ -27,6 +28,8 @@ task('default', ['build', 'minify', 'test'], function () { */ desc('Build the visualization library vis.js'); task('build', {async: true}, function () { + jake.mkdirP(DIST); + // concatenate and stringify the css files concat({ src: [ @@ -137,7 +140,7 @@ task('minify', function () { * test task */ desc('Test the library'); -task('test', ['build'], function () { +task('test', function () { // TODO: use a testing suite for testing: nodeunit, mocha, tap, ... var filelist = new jake.FileList(); filelist.include([ diff --git a/README.md b/README.md index a97439b5..b004b0dc 100644 --- a/README.md +++ b/README.md @@ -134,13 +134,9 @@ root of the project. cd vis npm install -To be able to run jake from the command line, jake must be installed globally: +Then, the project can be build running: - sudo npm install -g jake - -Then, the project can be build by executing jake in the root of the project: - - jake + npm run build ## License diff --git a/package.json b/package.json index b274d2b8..d6907b8b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "browser" ], "scripts": { - "test": "jake test --trace" + "test": "jake test --trace", + "build": "jake --trace" }, "dependencies": {}, "devDependencies": { diff --git a/test/dataset.js b/test/dataset.js index 63446918..4934a7f3 100644 --- a/test/dataset.js +++ b/test/dataset.js @@ -1,6 +1,6 @@ var assert = require('assert'), moment = require('moment'), - vis = require('../vis.js'), + vis = require('../dist/vis.js'), DataSet = vis.DataSet; var now = new Date(); diff --git a/test/dataview.js b/test/dataview.js index 412caa5f..48721ece 100644 --- a/test/dataview.js +++ b/test/dataview.js @@ -1,6 +1,6 @@ var assert = require('assert'), moment = require('moment'), - vis = require('../vis.js'), + vis = require('../dist/vis.js'), DataSet = vis.DataSet, DataView = vis.DataView; diff --git a/test/eventbus.js b/test/eventbus.js index df4d8a94..9019effc 100644 --- a/test/eventbus.js +++ b/test/eventbus.js @@ -1,7 +1,7 @@ // test vis.EventBus var assert = require('assert'), - vis = require('../vis'); + vis = require('../dist/vis'); var bus = new vis.EventBus(); From 9e93580ddda4ca45786d7cb9f05fa210d8aa5000 Mon Sep 17 00:00:00 2001 From: josdejong Date: Tue, 14 Jan 2014 16:26:56 +0100 Subject: [PATCH 02/10] Released version 0.3.0 --- HISTORY.md | 2 +- README.md | 21 +++++++++++++++++---- bower.json | 2 +- package.json | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index a6da520c..620a76db 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,7 +2,7 @@ vis.js history http://visjs.org -## , version 0.3.0 +## 2014-01-14, version 0.3.0 - Moved the generated library to folder `./dist` - Css stylesheet must be loaded explicitly now. diff --git a/README.md b/README.md index b004b0dc..4fcb1e6d 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,14 @@ Or download the library from the github project: ## Load -To use a component, include the javascript file of vis in your web page: +To use a component, include the javascript and css files of vis in your web page: ```html - + + + +