UNPKG

nuka-code

Version:

A package brought to you by the Nuka-Cola Corporation to zap away those pesky `cache`, `node_modules`, and other related files & directories.

59 lines (56 loc) 2.13 kB
import ignore from 'ignore'; /** * Nuke everything. * @param rootDir - The root directory of the project. * @returns The paths to the directories that should be nuked. */ declare function nukeEverything(rootDir?: string): Promise<{ cache: boolean; builds: boolean; node_modules: boolean; }>; /** * Nuke the node_modules directories. * @param rootDir - The root directory of the project. * @returns The paths to the node_modules directories that should be nuked. */ declare function nukeNodeModules(rootDir?: string, runId?: number): Promise<boolean>; /** * Nuke the cache directories. * @param rootDir - The root directory of the project. * @returns The paths to the cache directories that should be nuked. */ declare function nukeCache(rootDir?: string, runId?: number): Promise<boolean>; /** * Nuke the build directories. * @param rootDir - The root directory of the project. * @returns The paths to the build directories that should be nuked. */ declare function nukeBuilds(rootDir?: string, runId?: number): Promise<boolean>; /** * Nuke everything. * @returns The glob patterns to the directories that should be nuked. */ declare function getNukeEverythingGlob(): string[]; /** * Get the glob patterns to the node_modules. * @returns The glob patterns to the directories that should be nuked. */ declare function getNukeNodeModulesGlob(): string[]; /** * Get the glob patterns to the cache. * @returns The glob patterns to the directories that should be nuked. */ declare function getNukeCacheGlob(): string[]; /** * Get the glob patterns to the builds. * @returns The glob patterns to the directories that should be nuked. */ declare function getNukeBuildsGlob(): string[]; /** * Create a helper to check if a file is ignored. * @param rootDir - The root directory of the project. * @returns The ignore file helper. */ declare function createIgnoreFileHelper(rootDir?: string): Promise<ignore.Ignore>; export { createIgnoreFileHelper, getNukeBuildsGlob, getNukeCacheGlob, getNukeEverythingGlob, getNukeNodeModulesGlob, nukeBuilds, nukeCache, nukeEverything, nukeNodeModules };