Skip to content

Commit

Permalink
feat: Add version to dTree #14
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikGartner committed Dec 30, 2015
1 parent 2384b01 commit ffd9737
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ gulp.task('build', ['lint-src', 'clean'], function(done) {
});

$.file(exportFileName + '.js', res.code, { src: true })
.pipe($.preprocess({context: {DTREE_VERSION: manifest.version}}))
.pipe($.plumber())
.pipe($.sourcemaps.init({ loadMaps: true }))
.pipe($.babel())
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"gulp-bump": "^1.0.0",
"gulp-conventional-changelog": "^0.7.0",
"gulp-git": "^1.5.0",
"gulp-preprocess": "^2.0.0",
"minimist": "^1.2.0",
"isparta": "~3.0.3",
"jquery": "^2.1.4",
Expand Down
2 changes: 2 additions & 0 deletions src/dtree.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import TreeBuilder from './builder.js';

const dTree = {

version: '/* @echo DTREE_VERSION */',

init: function(data, options = {}) {

var opts = _.defaultsDeep(options || {}, {
Expand Down

0 comments on commit ffd9737

Please sign in to comment.