import { SoftwarePackage } from '@stencila/schema'; import PackageGenerator from './PackageGenerator'; import IUrlFetcher from './IUrlFetcher'; /** * A Dockerfile generator for R packages */ export default class RGenerator extends PackageGenerator { /** * Date used to pin the CRAN mirror used */ date: string; constructor(urlFetcher: IUrlFetcher, pkg: SoftwarePackage, folder?: string); applies(): boolean; envVars(sysVersion: string): Array<[string, string]>; aptKeysCommand(sysVersion: string): string; aptRepos(base: string): Array; aptPackages(sysVersion: string): Array; stencilaInstall(sysVersion: string): string | undefined; installFiles(sysVersion: string): Array<[string, string]>; installCommand(sysVersion: string): string | undefined; /** * The files to copy into the Docker image * * Copies all `*.R` files to the container */ projectFiles(): Array<[string, string]>; /** * The command to execute in a container created from the Docker image * * If there is a top-level `main.R` or `cmd.R` then that will be used, * otherwise, the first `*.R` files by alphabetical order will be used. */ runCommand(): string | undefined; }