I created a Module to import all JSON files in a certain Directory and now I want to convert them into JS files and export them in a directory. I want to do that using babel plugin or shellJS
recursiveReadDir(MODEL_PATH, [], function (err, fileNames) {
if (err)
{
console.error(err);
process.exit(1);
}
for (let i = 0; i < fileNames.length; i++)
{
const internalPath = toInternalPath(handleSlashes(fileNames[i]))
if (internalPath === null)
{
continue;
}
const appName = getFirstSegment(internalPath);
const inAppPath = "." + internalPath.substr(appName.length);
const { processName, shortName, isDomain, isComposite } = matchPath(inAppPath);