UNPKG

1.27 kBTypeScriptView Raw
1/** Carpent question (inquirer) type */
2export interface CarpentQuestion {
3 name: string;
4 type: "checkbox" | "confirm" | "editor" | "expand" | "input" | "list" | "number" | "password" | "rawlist";
5 message: string;
6 default?: string;
7 choices?: string[];
8 files?: string[];
9 jsonKey?: string;
10 find?: string;
11 replace?: string;
12}
13/** Carpent configuration object type */
14export interface CarpentConfig {
15 deleteFiles?: string[];
16 questions?: CarpentQuestion[];
17 beforeAll?: string[];
18 afterAll?: string[];
19}
20/**
21 * Bootstrap a new project with Carpent
22 * @param defaultAnswers - Object containing values
23 */
24export declare const carpent: (defaultAnswers?: {
25 [index: string]: string;
26}) => Promise<{
27 path: string;
28}>;
29/**
30 * Get the text for a license
31 * @param SPDX - License SPDX identifier
32 */
33export declare const getLicenseText: (SPDX: string) => Promise<string>;
34/** Licenses (SPDX to name map) */
35export declare const LICENSES: {
36 "Apache-2.0": string;
37 "BSD-3-Clause": string;
38 "CC-BY-SA-4.0": string;
39 "GPL-3.0": string;
40 MIT: string;
41 UNLICENSED: string;
42 "BSD-2-Clause": string;
43 "CC-BY-4.0": string;
44 "CC0-1.0": string;
45 ISC: string;
46 "MPL-2.0": string;
47 Unlicense: string;
48};