tasks/bundles.js
function ( pkg, compiler ) {
			if ( !sys.isEmpty( task.data.depends ) && options.resolveAliases && !sys.isEmpty( pkg.dependAliases ) ) {

				compiler.transform( function ( file ) {
					grunt.verbose.writeln( "Transforming " + file );
					function write( buf ) {
						data += buf;
					}

					var data = '';

					return through( write, function () {
						var __aliases = [];
						sys.each( pkg.dependAliases, function ( al ) {
							if ( data.indexOf( "'" + al + "'" ) !== -1 || data.indexOf( '"' + al + '"' ) !== -1 ) {
								__aliases.push( "'" + al + "' : '" + al + "'" );

								data = data.replace( new RegExp( "'" + al + "'", "g" ), "__aliases['" + al + "']" );
								data = data.replace( new RegExp( '"' + al + '"', "g" ), "__aliases['" + al + "']" );
							}
						} );
						if ( !sys.isEmpty( __aliases ) ) {
							var aliasDefinition = "var __aliases = {" + __aliases.join( ",\n" ) + "};\n";

							data = aliasDefinition + data;

						}
						this.queue( data );
						this.queue( null );
					} );

				} );
			}
		}
function ( pkg, compiler ) {
			if ( !sys.isEmpty( task.data.depends ) && options.resolveAliases && !sys.isEmpty( pkg.dependAliases ) ) {

				compiler.transform( function ( file ) {
					grunt.verbose.writeln( "Transforming " + file );
					function write( buf ) {
						data += buf;
					}

					var data = '';

					return through( write, function () {
						var __aliases = [];
						sys.each( pkg.dependAliases, function ( al ) {
							if ( data.indexOf( "'" + al + "'" ) !== -1 || data.indexOf( '"' + al + '"' ) !== -1 ) {
								__aliases.push( "'" + al + "' : '" + al + "'" );

								data = data.replace( new RegExp( "'" + al + "'", "g" ), "__aliases['" + al + "']" );
								data = data.replace( new RegExp( '"' + al + '"', "g" ), "__aliases['" + al + "']" );
							}
						} );
						if ( !sys.isEmpty( __aliases ) ) {
							var aliasDefinition = "var __aliases = {" + __aliases.join( ",\n" ) + "};\n";

							data = aliasDefinition + data;

						}
						this.queue( data );
						this.queue( null );
					} );

				} );
			}
		}
function ( pkg , compiler ) { if ( ! sys . isEmpty ( task . data . depends ) && options . resolveAliases && ! sys . isEmpty ( pkg . dependAliases ) ) { compiler . transform ( function ( file ) { grunt . verbose . writeln ( "Transforming " + file ) ; function write ( buf ) { data += buf ; } var data = '' ; return through ( write , function ( ) { var __aliases = [ ] ; sys . each ( pkg . dependAliases , function ( al ) { if ( data . indexOf ( "'" + al + "'" ) !== - 1 || data . indexOf ( '"' + al + '"' ) !== - 1 ) { __aliases . push ( "'" + al + "' : '" + al + "'" ) ; data = data . replace ( new RegExp ( "'" + al + "'" , "g" ) , "__aliases['" + al + "']" ) ; data = data . replace ( new RegExp ( '"' + al + '"' , "g" ) , "__aliases['" + al + "']" ) ; } } ) ; if ( ! sys . isEmpty ( __aliases ) ) { var aliasDefinition = "var __aliases = {" + __aliases . join ( ",\n" ) + "};\n" ; data = aliasDefinition + data ; } this . queue ( data ) ; this . queue ( null ) ; } ) ; } ) ; } }
transform dependencies while browserify runs
transform dependencies while browserify runs