clang-format-node
Version:
Node wrapper for clang-format native binary inspired by angular/clang-format.🐉
1 lines • 806 B
JavaScript
;var _require=require("fs"),existsSync=_require.existsSync;var _require2=require("path"),resolve=_require2.resolve;function getClangFormatPath(osPlatform,architecture){var clangFormatPath=resolve(__dirname,"..","..","bin","cfn-".concat(osPlatform,"-").concat(architecture),"clang-format".concat(osPlatform==="win32"?".exe":""));if(!existsSync(clangFormatPath))throw new Error("No executable found for '".concat(osPlatform,"(OS platform)-").concat(architecture,"(architecture)'\nThe possible combinations are 'darwin-arm64', 'darwin-x64', 'linux-arm', 'linux-arm64', 'linux-ppc64', 'linux-s390x', 'linux-x64', 'win32-x64'"));return clangFormatPath}var getClangFormatNodePath=getClangFormatPath;module.exports={getClangFormatPath:getClangFormatPath,getClangFormatNodePath:getClangFormatNodePath};