function _getJsListOfModule(moduleMap, moduleName){
        var jsAddedCache = _jsAddedCache;
        if(jsAddedCache[moduleName]) return null;
        jsAddedCache[moduleName] = true;
        var jsList = [];
        var tempList = moduleMap[moduleName];
        if(!tempList) throw "can not find module [" + moduleName + "]";
        for(var i = 0, li = tempList.length; i < li; i++){
            var item = tempList[i];
            if(jsAddedCache[item]) continue;
            var extname = path.extname(item);
            if(!extname) {
                var arr = _getJsListOfModule(moduleMap, item);
                if(arr) jsList = jsList.concat(arr);
            }else if(extname.toLowerCase() == ".js") jsList.push(item);
            jsAddedCache[item] = true;
        }
        return jsList;
    }
Put the `tools` in the root of your project, then run this script with nodejs.
@type {exports|*}