Monday, June 23, 2014

dygraphs as an NPM package

dygraphs is now available as an NPM package.
NPM is the NodeJS package manager. It works well enough that it's used for all sorts of packaging, even when NodeJS isn't involved.

To install dygraphs via NPM, simply run:
npm install dygraphs
This will install dygraphs under a node_modules directory, for example:
ls -lh node_modules/dygraphs/dygraph-combined.js 
Once you've got it installed, you can source it from that location in your web page, web server, Python program, whatever.

If you create a package.json file, you can specify a specific version of dygraphs that you'd like to depend on. That way, you can keep getting a compatible version in the 1.x series, even after we move on to 2.x.

1 comment: