]> source.dussan.org Git - jquery.git/commitdiff
Build: remove stale Insight package from custom builds
authorTimmy Willison <4timmywil@gmail.com>
Tue, 20 Dec 2022 20:57:49 +0000 (20:57 +0000)
committerGitHub <noreply@github.com>
Tue, 20 Dec 2022 20:57:49 +0000 (20:57 +0000)
Close gh-5182

build/tasks/build.js
package.json

index 61ec670fb4a1e5b39f60b89634ca699bb554393d..bcfa8ceae62a74d6d7012ef91da028a476164738 100644 (file)
@@ -12,8 +12,6 @@ module.exports = function( grunt ) {
        const rollup = require( "rollup" );
        const slimBuildFlags = require( "./lib/slim-build-flags" );
        const rollupFileOverrides = require( "./lib/rollup-plugin-file-overrides" );
-       const Insight = require( "insight" );
-       const pkg = require( "../../package.json" );
        const srcFolder = path.resolve( `${ __dirname }/../../src` );
        const read = function( fileName ) {
                return grunt.file.read( `${ srcFolder }/${ fileName }` );
@@ -339,46 +337,8 @@ module.exports = function( grunt ) {
                const modules = args.length ?
                        args[ 0 ].split( "," ).join( ":" ) :
                        "";
-               const done = this.async();
-               const insight = new Insight( {
-                       trackingCode: "UA-1076265-4",
-                       pkg: pkg
-               } );
-
-               function exec( trackingAllowed ) {
-                       let tracks = args.length ? args[ 0 ].split( "," ) : [];
-                       const defaultPath = [ "build", "custom" ];
-
-                       tracks = tracks.map( function( track ) {
-                               return track.replace( /\//g, "+" );
-                       } );
-
-                       if ( trackingAllowed ) {
-
-                               // Track individuals
-                               tracks.forEach( function( module ) {
-                                       const path = defaultPath.concat( [ "individual" ], module );
-
-                                       insight.track.apply( insight, path );
-                               } );
-
-                               // Track full command
-                               insight.track.apply( insight, defaultPath.concat( [ "full" ], tracks ) );
-                       }
-
-                       grunt.task.run( [ "build:*:*" + ( modules ? ":" + modules : "" ), "uglify", "dist" ] );
-                       done();
-               }
 
                grunt.log.writeln( "Creating custom build...\n" );
-
-               // Ask for permission the first time
-               if ( insight.optOut === undefined ) {
-                       insight.askPermission( null, function( _error, result ) {
-                               exec( result );
-                       } );
-               } else {
-                       exec( !insight.optOut );
-               }
+               grunt.task.run( [ "build:*:*" + ( modules ? ":" + modules : "" ), "uglify", "dist" ] );
        } );
 };
index 84a375ac6e341e6bd4c384e8c659cc4b18745c27..3fee5c5eb2321a86091f9e9bbb70306b7eaa9211 100644 (file)
@@ -46,7 +46,6 @@
     "grunt-npmcopy": "0.2.0",
     "gzip-js": "0.3.2",
     "husky": "4.2.5",
-    "insight": "0.10.3",
     "jsdom": "19.0.0",
     "karma": "^6.3.17",
     "karma-browserstack-launcher": "1.6.0",