{
"name": "dygraphs",
- "version": "1.1.0",
+ "version": "2.0.0-rc2",
"description": "dygraphs is a fast, flexible open source JavaScript charting library.",
- "main": "dist/src/dygraph.js",
- "directories": {
- "doc": "docs",
- "test": "tests"
- },
+ "main": "src-es5/dygraph.js",
+ "module": "index",
+ "jsnext:main": "index",
+ "files": [
+ "index.js",
+ "docs",
+ "dist",
+ "src",
+ "src-es5"
+ ],
"repository": {
"type": "git",
"url": "git://github.com/danvk/dygraphs.git"
"browserify-header": "^0.9.2",
"chai": "^3.3.0",
"clean-css": "^3.4.23",
+ "core-js": "^2.4.1",
"coveralls": "^2.11.2",
"envify": "^3.4.0",
"exorcist": "^0.4.0",
"mocha": "^2.1.0",
"mocha-phantomjs": "3.5.3",
"mocha-phantomjs-istanbul": "0.0.2",
- "obvious-closure-library": "^20140401.0.2",
"parse-data-uri": "^0.2.0",
"phantomjs": "^1.9.7-8",
"pre-commit": "^1.0.6",
},
"pre-commit": [
"tests-ok"
- ],
- "dependencies": {
- "core-js": "^2.4.1"
- }
+ ]
}
#!/bin/bash
-# This generates:
-# - dist/dygraph.js
-# - dist/dygraph.js.map
-# - dist/dygraph.min.js
-# - dist/dygraph.min.js.map
+# This generates everything under dist:
+# bundled JS, minified JS, minified CSS and source maps.
set -o errexit
mkdir -p dist
cp css/dygraph.css dist/
cleancss css/dygraph.css -o dist/dygraph.min.css --source-map --source-map-inline-sources
+# Build ES5-compatible distribution
+babel src -d src-es5 --compact false
+
# Remove temp files.
rm dist/dygraph.tmp.js
rm dist/dygraph.tmp.js.map