Skip to content

Commit 81d5bd1

Browse files
authored
Build: remove stale Insight package from custom builds
Close gh-5180
1 parent 8989500 commit 81d5bd1

File tree

2 files changed

+2
-43
lines changed

2 files changed

+2
-43
lines changed

build/tasks/build.js

+2-42
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ module.exports = function( grunt ) {
1010
var fs = require( "fs" ),
1111
requirejs = require( "requirejs" ),
1212
slimBuildFlags = require( "./lib/slim-build-flags" ),
13-
Insight = require( "insight" ),
14-
pkg = require( "../../package.json" ),
1513
srcFolder = __dirname + "/../../src/",
1614
rdefineEnd = /\}\s*?\);[^}\w]*$/,
1715
read = function( fileName ) {
@@ -354,47 +352,9 @@ module.exports = function( grunt ) {
354352
), [] )
355353

356354
.join( ":" ) :
357-
"",
358-
done = this.async(),
359-
insight = new Insight( {
360-
trackingCode: "UA-1076265-4",
361-
pkg: pkg
362-
} );
363-
364-
function exec( trackingAllowed ) {
365-
var tracks = args.length ? args[ 0 ].split( "," ) : [];
366-
var defaultPath = [ "build", "custom" ];
367-
368-
tracks = tracks.map( function( track ) {
369-
return track.replace( /\//g, "+" );
370-
} );
371-
372-
if ( trackingAllowed ) {
373-
374-
// Track individuals
375-
tracks.forEach( function( module ) {
376-
var path = defaultPath.concat( [ "individual" ], module );
377-
378-
insight.track.apply( insight, path );
379-
} );
380-
381-
// Track full command
382-
insight.track.apply( insight, defaultPath.concat( [ "full" ], tracks ) );
383-
}
384-
385-
grunt.task.run( [ "build:*:*" + ( modules ? ":" + modules : "" ), "uglify", "dist" ] );
386-
done();
387-
}
355+
"";
388356

389357
grunt.log.writeln( "Creating custom build...\n" );
390-
391-
// Ask for permission the first time
392-
if ( insight.optOut === undefined ) {
393-
insight.askPermission( null, function( _error, result ) {
394-
exec( result );
395-
} );
396-
} else {
397-
exec( !insight.optOut );
398-
}
358+
grunt.task.run( [ "build:*:*" + ( modules ? ":" + modules : "" ), "uglify", "dist" ] );
399359
} );
400360
};

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"grunt-npmcopy": "0.2.0",
4545
"gzip-js": "0.3.2",
4646
"husky": "4.2.5",
47-
"insight": "0.10.3",
4847
"jsdom": "19.0.0",
4948
"karma": "^6.3.17",
5049
"karma-browserstack-launcher": "1.6.0",

0 commit comments

Comments
 (0)