piral-cli
Version:
The standard CLI for creating and building a Piral instance or a Pilet.
63 lines (62 loc) • 1.81 kB
TypeScript
import { SourceLanguage, LogLevels, Framework, NpmClientType } from '../types';
import { ForceOverwrite } from '../common';
export interface NewPiralOptions {
/**
* The package registry to use for resolving the specified Piral app.
*/
registry?: string;
/**
* Sets the path to the app's source HTML file.
*/
app?: string;
/**
* Sets the framework/library to use.
*/
framework?: Framework;
/**
* Sets the target directory where the generated files should be placed.
*/
target?: string;
/**
* The initial version that will also be written into the package.json
*/
version?: string;
/**
* Determines if files should be overwritten by the installation.
*/
forceOverwrite?: ForceOverwrite;
/**
* Determines the programming language for the new Piral instance. (e.g. 'ts')
*/
language?: SourceLanguage;
/**
* States if the npm dependecies should be installed when scaffolding.
*/
install?: boolean;
/**
* Sets the boilerplate template to be used when scaffolding.
*/
template?: string;
/**
* The log level that should be used within the scaffolding process.
*/
logLevel?: LogLevels;
/**
* Sets the npm client to be used when scaffolding. (e.g. 'yarn')
*/
npmClient?: NpmClientType;
/**
* Sets the default bundler to install. (e.g. 'parcel').
*/
bundlerName?: string;
/**
* Places additional variables that should used when scaffolding.
*/
variables?: Record<string, string>;
/**
* Sets new app name
*/
name?: string;
}
export declare const newPiralDefaults: NewPiralOptions;
export declare function newPiral(baseDir?: string, options?: NewPiralOptions): Promise<void>;