@@ -4,7 +4,6 @@ var browserify = require('browserify');
44var UglifyJS = require ( 'uglify-js' ) ;
55
66var compressAttributes = require ( './util/compress_attributes' ) ;
7- var appendVersion = require ( './util/append_version' ) ;
87var constants = require ( './util/constants' ) ;
98
109/*
@@ -48,19 +47,11 @@ browserify(constants.pathToPlotlySrc, {
4847 if ( ! DEV ) {
4948 fs . writeFile (
5049 constants . pathToPlotlyDistMin ,
51- UglifyJS . minify ( buf . toString ( ) , constants . uglifyOptions ) . code ,
52- function ( ) {
53- appendVersion (
54- constants . pathToPlotlyDistMin , { object : 'Plotly' }
55- ) ;
56- }
50+ UglifyJS . minify ( buf . toString ( ) , constants . uglifyOptions ) . code
5751 ) ;
5852 }
5953} )
60- . pipe ( fs . createWriteStream ( constants . pathToPlotlyDist ) )
61- . on ( 'finish' , function ( ) {
62- appendVersion ( constants . pathToPlotlyDist , { object : 'Plotly' , DEV : DEV } ) ;
63- } ) ;
54+ . pipe ( fs . createWriteStream ( constants . pathToPlotlyDist ) ) ;
6455
6556
6657// Browserify the geo assets
@@ -70,10 +61,7 @@ browserify(constants.pathToPlotlyGeoAssetsSrc, {
7061. bundle ( function ( err ) {
7162 if ( err ) throw err ;
7263} )
73- . pipe ( fs . createWriteStream ( constants . pathToPlotlyGeoAssetsDist ) )
74- . on ( 'finish' , function ( ) {
75- appendVersion ( constants . pathToPlotlyGeoAssetsDist , { object : 'PlotlyGeoAssets' } ) ;
76- } ) ;
64+ . pipe ( fs . createWriteStream ( constants . pathToPlotlyGeoAssetsDist ) ) ;
7765
7866
7967// Browserify the plotly.js with meta
@@ -84,7 +72,4 @@ browserify(constants.pathToPlotlySrc, {
8472. bundle ( function ( err ) {
8573 if ( err ) throw err ;
8674} )
87- . pipe ( fs . createWriteStream ( constants . pathToPlotlyDistWithMeta ) )
88- . on ( 'finish' , function ( ) {
89- appendVersion ( constants . pathToPlotlyDistWithMeta , { object : 'Plotly' , DEV : DEV } ) ;
90- } ) ;
75+ . pipe ( fs . createWriteStream ( constants . pathToPlotlyDistWithMeta ) ) ;
0 commit comments