tasks/dist.js
function fileext(type,path){
    if(!path) path = type,type = false;

    var file_arr = path.match(/([^:\\/]*?)(?:\.([^ :\\/.]*))$/)
    var fileext = file_arr[2];
    var name = file_arr[1];
    var new_name = ''

    switch(type){
        case "min":new_name = name + '.min.' + fileext;break;
        case "map": new_name = name + '.min.map';break;
        case "gz": new_name = name + '.min.gz';break;
        default: new_name = file_arr[0];
    }
    return new_name;
}
function fileext(type,path){
    if(!path) path = type,type = false;

    var file_arr = path.match(/([^:\\/]*?)(?:\.([^ :\\/.]*))$/)
    var fileext = file_arr[2];
    var name = file_arr[1];
    var new_name = ''

    switch(type){
        case "min":new_name = name + '.min.' + fileext;break;
        case "map": new_name = name + '.min.map';break;
        case "gz": new_name = name + '.min.gz';break;
        default: new_name = file_arr[0];
    }
    return new_name;
}
返回文件名字 + 后缀