Skip to content

Commit

Permalink
Prod packaging critical bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhus committed Sep 22, 2016
1 parent 1ec5fbb commit 15f6916
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,19 @@ gulp.task('build:prod', done => {
resolve();
})
.pipe(rename('gauge.min.js'))
.pipe(replace(/^/, '(function() {'))
.pipe(replace(/$/, '}());'))
.pipe(replace(/^/, '(function(ns) {'))
.pipe(replace(/$/,
';typeof module !== "undefined" && Object.assign(ns, {' +
'Collection: Collection,' +
'GenericOptions: GenericOptions,' +
'Animation: Animation,' +
'BaseGauge: BaseGauge,' +
'drawings: drawings,' +
'SmartCanvas: SmartCanvas,' +
'vendorize: vendorize' +
'});' +
'}(typeof module !== "undefined" ? ' +
'module.exports : window));'))
.pipe(uglify())
.pipe(gulp.dest('dist/' + type))
.on('end', () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canvas-gauges",
"version": "2.1.0",
"version": "2.0.2",
"description": "Minimalistic HTML5 Canvas Gauges",
"main": "gauge.min.js",
"directories": {
Expand Down

0 comments on commit 15f6916

Please sign in to comment.