///
import { readFileSync, writeFileSync } from 'fs';
import { ls, mkdir, test } from 'shelljs';
import { defaultLibraries } from './defaults';
export interface Options extends Context {
help?: boolean;
debug?: boolean;
outputFolder?: string;
}
export interface Context {
type?: 'debug' | 'production';
/**
* If true it won't remove the $PREFIX folder before start. This is useful to re-use a prefix folder
* generated by a previous run so project's won't be downloaded / cloned again and existing sources will be
* used instead. Not recommended to release.
*/
noClean?: boolean;
/**
* the greater the more memory it consumes
*/
quantumDepth?: '8' | '16' | '32';
/**
* High resolution for pixel transformation. Impacts speed. Default value: false
*/
noHdri?: boolean;
/**
* Name of the folder inside `outputFolder` where scripts will be generated
*/
scriptsFolder?: string;
/**
* Internal. points to local src/template folder containing ejs template files from which build shell scripts are generated.
*/
templatesFolder?: string;
/**
* If given it will only compile these libraries and disable the rest. Can be used to create a limited version of IM or, together with --noClean,for fast builds when testing/porting a concrete library.
*/
libraries?: Library[];
/**
* If true, does not build any libraries, just ImageMagick
*/
noLibraries?: boolean;
/**
* Skips `./configure` step on ImageMagick
*/
skipImageMagickConfig?: boolean;
/**
* Skips `make` step on ImageMagick
*/
skipImageMagickBuild?: boolean;
/**
* If true it just generate scripts and doesn't execute them (with docker)
*/
noRun?: boolean;
}
export declare type Library = keyof (typeof defaultLibraries);
export interface TemplateContext extends Options {
addLib(this: Required, lib: Library): void;
test: typeof test;
ls: typeof ls;
mkdir: typeof mkdir;
readFileSync: typeof readFileSync;
writeFileSync: typeof writeFileSync;
}