UNPKG

makit

Version:

Make in JavaScript done right!

35 lines (34 loc) 1.53 kB
import { Rule } from './rule'; import { TimeStamp } from '../fs/time-stamp'; import { PrerequisitesDeclaration } from './prerequisites'; import { TargetDeclaration } from './target'; import { RecipeDeclaration } from './recipe'; import { Reporter } from '../reporters/reporter'; /** * 给最终使用者的 makefile.js 中暴露的全局变量 makit 即为 Makefile 实例 */ export declare class Makefile { root: string; disableCheckCircular: boolean; private ruleMap; private fileTargetRules; private matchingRules; private reporter; private makeImpl; constructor(root?: string, reporter?: Reporter); updateOrAddRule(targetDecl: TargetDeclaration, prerequisitesDecl?: PrerequisitesDeclaration, recipeDecl?: RecipeDeclaration): void; addRule(targetDecl: TargetDeclaration, prerequisitesDecl?: PrerequisitesDeclaration, recipeDecl?: RecipeDeclaration): Rule; addRude(targetDecl: TargetDeclaration, prerequisitesDecl?: PrerequisitesDeclaration, recipeDecl?: RecipeDeclaration): void; updateRule(targetDecl: TargetDeclaration, prerequisitesDecl?: PrerequisitesDeclaration, recipeDecl?: RecipeDeclaration): void; /** * makit 命令入口 * * 命令行调用 makit <target> 由本方法处理,具体的依赖递归解决由 Make 对象处理。 */ make(target?: string): Promise<TimeStamp>; invalidate(target: string): void; dependencyGraphString(): string; private matchRule; private findFirstTarget; private findFirstTargetOrThrow; }