From 412f6e333d5e95dd7c6e0691c7cc438c03163aa1 Mon Sep 17 00:00:00 2001 From: Alexander Wunschik Date: Sat, 31 Dec 2016 18:58:57 +0100 Subject: [PATCH] Readme improvements (#2520) * generate custom builds into the dist folder * updated the we-need-help link in the readme * general improvements of the readme --- README.md | 75 +++++++++++++++++++++++++------------------------------ 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index f4f1c188..ab8faaea 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ vis.js ================== - + @@ -10,8 +10,8 @@ The library is designed to be easy to use, handle large amounts of dynamic data, and enable manipulation of the data. The library consists of the following components: -- DataSet and DataView. A flexible key/value based data set. Add, update, and - remove items. Subscribe on changes in the data set. A DataSet can filter and +- DataSet and DataView. A flexible key/value based data set. Add, update, and + remove items. Subscribe on changes in the data set. A DataSet can filter and order items, and convert fields of items. - DataView. A filtered and/or formatted view on a DataSet. - Graph2d. Plot data on a timeline with lines or barcharts. @@ -19,8 +19,7 @@ The library consists of the following components: - Network. Display a network (force directed graph) with nodes and edges. - Timeline. Display different types of data on a timeline. -The vis.js library is developed by [Almende B.V](http://almende.com). - +The vis.js library was initially developed by [Almende B.V](http://almende.com). ## Install @@ -37,18 +36,16 @@ Link via cdnjs: http://cdnjs.com Or download the library from the github project: [https://github.com/almende/vis.git](https://github.com/almende/vis.git). - ## Load - To use a component, include the javascript and css files of vis in your web page: ```html - - + + + @@ -219,13 +215,13 @@ The custom bundle can now be loaded like: #### Example 2: Exclude external libraries -The default bundle `vis.js` is standalone and includes external dependencies such as hammer.js and moment.js. When these libraries are already loaded by the application, vis.js does not need to include these dependencies itself too. To build a custom bundle of vis.js excluding moment.js and hammer.js, run browserify in the root of the project: +The default bundle `vis.js` is standalone and includes external dependencies such as *hammer.js* and *moment.js*. When these libraries are already loaded by the application, vis.js does not need to include these dependencies itself too. To build a custom bundle of vis.js excluding *moment.js* and *hammer.js*, run browserify in the root of the project: - $ browserify index.js -t babelify -o vis-custom.js -s vis -x moment -x hammerjs - -This will generate a custom bundle *vis-custom.js*, which exposes the namespace `vis`, and has moment and hammerjs excluded. The generated bundle can be minified with uglifyjs: + $ browserify index.js -t babelify -o dist/vis-custom.js -s vis -x moment -x hammerjs - $ uglifyjs vis-custom.js -o vis-custom.min.js +This will generate a custom bundle *vis-custom.js*, which exposes the namespace `vis`, and has *moment.js* and *hammer.js* excluded. The generated bundle can be minified with uglifyjs: + + $ uglifyjs dist/vis-custom.js -o dist/vis-custom.min.js The custom bundle can now be loaded as: @@ -234,11 +230,11 @@ The custom bundle can now be loaded as: - - + + - + @@ -275,8 +271,8 @@ Install the application dependencies via npm: The application can be bundled and minified: - $ browserify app.js -o app-bundle.js -t babelify - $ uglifyjs app-bundle.js -o app-bundle.min.js + $ browserify app.js -o dist/app-bundle.js -t babelify + $ uglifyjs dist/app-bundle.js -o dist/app-bundle.min.js And loaded into a webpage: @@ -288,13 +284,11 @@ And loaded into a webpage:
- - + ``` - ## Test To test the library, install the project dependencies once: @@ -303,12 +297,11 @@ To test the library, install the project dependencies once: Then run the tests: - $ npm test - + $ npm run test ## License -Copyright (C) 2010-2015 Almende B.V. +Copyright (C) 2010-2016 Almende B.V. and Contributors Vis.js is dual licensed under both