UNPKG

frontity

Version:

Frontity cli and entry point to other packages

47 lines (46 loc) 1.35 kB
/** * Options passed to the `create-package` function. */ export declare type Options = { /** * Name of the package. */ name?: string; /** * Namespace of the package. */ namespace?: string; /** * Path of the Frontity project. */ projectPath?: string; /** * Path where the package should be created (relative to `projectPath`). */ packagePath?: string; }; /** * This function creates a `package.json` file. * * @param name - The package name. * @param namespace - Namespace. * @param projectPath - Project path. * @param packagePath - Package path. */ export declare const createPackageJson: (name: string, namespace: string, projectPath: string, packagePath: string) => Promise<void>; /** * This function creates an `index.js` file. * * @param name - The name. * @param namespace - Namespace name. * @param projectPath - Project path. * @param packagePath - Package path. */ export declare const createSrcIndexJs: (name: string, namespace: string, projectPath: string, packagePath: string) => Promise<void>; /** * This function executes the `npm i` command to add the created package. * * @param projectPath - Project path. * @param packagePath - Package path. */ export declare const installPackage: (projectPath: string, packagePath: string) => Promise<void>;