@gobstones/gobstones-scripts
Version:
Scripts to abstract away build configuration of Gobstones Project's libraries and modules.
83 lines • 4.31 kB
TypeScript
/**
* Create a new library project in a subfolder with the given name.
* This includes creating all the required and recommended style files
* define a package.json, git configuration files, visual studio code
* files, NPM configuration files, contribution guidelines, a readme,
* a license (MIT by default), install all dependencies, and initialize
* a git repository.
*
* @param projectName - The name of the project to be created.
* @param projectType - The project type to create (Defaults to `"library"`).
* @param packageManager - The package manager to use when downloading dependencies.
* @param test - Whether test information should be added to the .npmrc file.
*
* @throws
* {@link FileSystemError}: If the argument for projectType or packageManager is invalid.
*
* {@link FileSystemError}: If there's already a folder with the project name, or the folder is not empty.
*/
export declare const create: (projectName: string, projectType?: string, packageManager?: string, test?: boolean) => void;
/**
* The same as {@link create}, but runs on the local folder as a project.
* That is, initialize a project in the given folder, which default
* to the root. Note that the folder must be empty in order to
* initialize a project in the folder.
*
* @param projectType - The project type to initialize (Defaults to `"library"`).
* @param packageManager - The package manager to use when downloading dependencies.
* @param test - Whether test information should be added to the .npmrc file.
*
* @throws If the current folder is not empty.
*/
export declare const init: (projectType?: string, packageManager?: string, test?: boolean) => void;
/**
* Override the missing configuration files that are created on
* an **init** or **create** command on the local project. This
* is intended to be run locally, on an already created project,
* to update the configuration. By appending **force** as a
* subcommand, all files are updated to their latest version.
*
* @param file - The file name to update, or "all" if all should be
* updated (Defaults to `"all"`).
* @param force - Whether to force the update of files, that is,
* override already present files in the project with their newest version
* (Defaults to `false`).
* @param projectType - The project type to update from (Defaults to `"library"`).
* @param test - Whether test information should be added to the .npmrc file.
*
* @returns The list of updated files.
*/
export declare const update: (file?: string, force?: boolean, projectType?: string, test?: boolean) => string[];
/**
* Eject all the general configuration files to the root project.
* This includes configuration files for Typescript, Typedoc, JEST,
* Rollup, and nps. This command is intended to be run locally. If
* **force** is added, all previously created local files are updated
* to their latest version. If not, only missing files are copied.
*
* @param file - The file name to update, or "all" if all should
* be updated (Defaults to `"all"`).
* @param force - Whether to force the ejection of files, that is,
* override already present files in the project with their newest version
* (Defaults to `false`).
* @param projectType - The project type to eject from (Defaults to `"library"`).
*
* @returns The list of updated files.
*/
export declare const eject: (file?: string, force?: boolean, projectType?: string) => string[];
/**
* Run a command using **nps**. nps allows to run different scripts
* configured, such as scripts for linting, prettyfing, testing,
* generating documentation, running in development mode, and others.
*
* @param command - The nps command to execute.
* @param userArgs - The nps command additional arguments.
* @param projectType - The project type to use as configuration (Defaults to `"library"`).
* @param packageManager - The package manager to use when running commands.
* @param usePlainTsConfig - Wether to use the plain tsconfig.json in project
* folder instead of generating one from .js file.
*
* @returns The list of updated files.
*/
export declare const run: (command: string, userArgs?: string[], projectType?: string, packageManager?: string, usePlainTsConfig?: boolean) => void;
//# sourceMappingURL=api.d.ts.map