Skip to content

Commit 970088a

Browse files
committed
require package.json into index.js and geo_assets.js:
- to show package version onto exported object in a low-cost, seemless way.
1 parent b0cca52 commit 970088a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/assets/geo_assets.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@
99

1010
var saneTopojson = require('sane-topojson');
1111

12+
// export the version found in the package.json
13+
exports.version = require('../../package.json').version;
14+
1215
exports.topojson = saneTopojson;

src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
var Plotly = require('./plotly');
1818

19+
// export the version found in the package.json
20+
exports.version = require('../package.json').version;
21+
1922
// plot api
2023
exports.plot = Plotly.plot;
2124
exports.newPlot = Plotly.newPlot;

0 commit comments

Comments
 (0)