UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

50 lines 2.86 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowrRAdapter = exports.FlowrRStudioAddin = exports.FlowrPositron = exports.FlowrVsCode = exports.FlowrCodecovRef = exports.FlowrDockerRef = exports.FlowrNpmRef = exports.FlowrGithubRef = exports.FlowrWikiBaseRef = exports.RemoteFlowrFilePathBaseRef = exports.FlowrSiteBaseRef = exports.FlowrGithubBaseRef = exports.FlowrGithubGroupName = void 0; exports.getFilePathMd = getFilePathMd; exports.getFileContentFromRoot = getFileContentFromRoot; exports.linkFlowRSourceFile = linkFlowRSourceFile; const fs_1 = __importDefault(require("fs")); exports.FlowrGithubGroupName = 'flowr-analysis'; exports.FlowrGithubBaseRef = `https://github.com/${exports.FlowrGithubGroupName}`; exports.FlowrSiteBaseRef = `https://${exports.FlowrGithubGroupName}.github.io/flowr`; exports.RemoteFlowrFilePathBaseRef = `${exports.FlowrGithubBaseRef}/flowr/tree/main/`; exports.FlowrWikiBaseRef = `${exports.FlowrGithubBaseRef}/flowr/wiki`; exports.FlowrGithubRef = exports.FlowrGithubBaseRef + '/flowr'; exports.FlowrNpmRef = 'https://www.npmjs.com/package/@eagleoutice/flowr'; exports.FlowrDockerRef = 'https://hub.docker.com/r/eagleoutice/flowr'; exports.FlowrCodecovRef = `https://app.codecov.io/gh/${exports.FlowrGithubGroupName}/flowr`; exports.FlowrVsCode = 'https://marketplace.visualstudio.com/items?itemName=code-inspect.vscode-flowr'; exports.FlowrPositron = 'https://open-vsx.org/extension/code-inspect/vscode-flowr'; exports.FlowrRStudioAddin = `${exports.FlowrGithubBaseRef}/rstudio-addin-flowr`; exports.FlowrRAdapter = `${exports.FlowrGithubBaseRef}/flowr-r-adapter`; /** * Returns a markdown link to the given file path relative to the project root. */ function getFilePathMd(path) { // we go one up as we are in doc-util now :D #convenience const fullpath = require.resolve('../' + path); // normalize path separators so that this is consistent when testing on windows const cwd = process.cwd().replaceAll('\\', '/'); const relative = fullpath.replaceAll('\\', '/').replace(cwd, '.'); /* remove project prefix */ return `[\`${relative}\`](${exports.RemoteFlowrFilePathBaseRef}${relative})`; } /** * Returns the content of a file located at the given path relative to the project root. * This reads the file synchronously from disk. */ function getFileContentFromRoot(path) { const fullpath = require.resolve('../../../' + path); return fs_1.default.readFileSync(fullpath, 'utf-8'); } /** * Returns a markdown link to the given flowr source file path. */ function linkFlowRSourceFile(path) { return `[${path}](${exports.RemoteFlowrFilePathBaseRef}/${path})`; } //# sourceMappingURL=doc-files.js.map