tasks/replace.js
function(){
		var _replace	= this.config.tp + "$1" + this.config.tp,
			_al 		= this.config.html.replace( /(<script[^\\>]*src=[^\\>]*><\/script>)/gi , _replace ).split( this.config.tp ),
			_js 		= [],
			_url 		= "js/" + this.config.md5 + ".js";
		for( var i = _al.length; i--; ){
			if( i % 2 ){
				tool.checkFileStatus( _al[ i ].replace( /.*src=['|"]([^'|^"]*)['|"].*/gi , "$1" ) , function( exists , filePath ){
					if( exists ){
						_js.push( filePath );
						_al[ i ] = "";
					} else {
						if( !config.file_path.fetchUrl[ filePath ] ){
							config.file_path.fetchUrl[ filePath ] = tool.get_file_ts( filePath );
						}
						_al[ i ] = "<script type='text/javascript' src='" + config.file_path.fetchUrl[ filePath ] + "'></script>";
					};
				} );
			};
		};
		if( _js.length ){
			_al[ _al.length - 2 ] += "<script type='text/javascript' src='" + config.redirectOrigin + _url + "'></script>";
			this.config.js = _js;
			tool.uglify_js( this.config , config.dir.pub_dir + _url );
			tool.concat_done( _js , this.config , config.dir.pub_dir + _url );
		};
		return _al.join( "" );
	}
function(){
		var _replace	= this.config.tp + "$1" + this.config.tp,
			_al 		= this.config.html.replace( /(<script[^\\>]*src=[^\\>]*><\/script>)/gi , _replace ).split( this.config.tp ),
			_js 		= [],
			_url 		= "js/" + this.config.md5 + ".js";
		for( var i = _al.length; i--; ){
			if( i % 2 ){
				tool.checkFileStatus( _al[ i ].replace( /.*src=['|"]([^'|^"]*)['|"].*/gi , "$1" ) , function( exists , filePath ){
					if( exists ){
						_js.push( filePath );
						_al[ i ] = "";
					} else {
						if( !config.file_path.fetchUrl[ filePath ] ){
							config.file_path.fetchUrl[ filePath ] = tool.get_file_ts( filePath );
						}
						_al[ i ] = "<script type='text/javascript' src='" + config.file_path.fetchUrl[ filePath ] + "'></script>";
					};
				} );
			};
		};
		if( _js.length ){
			_al[ _al.length - 2 ] += "<script type='text/javascript' src='" + config.redirectOrigin + _url + "'></script>";
			this.config.js = _js;
			tool.uglify_js( this.config , config.dir.pub_dir + _url );
			tool.concat_done( _js , this.config , config.dir.pub_dir + _url );
		};
		return _al.join( "" );
	}
/*!
替换html文本中的 JS项