1 | export interface Git {
|
2 | exec: (command: string) => Promise<this>;
|
3 | init: () => Promise<this>;
|
4 | clean: () => Promise<this>;
|
5 | reset: (remote: string, branch: string) => Promise<this>;
|
6 | fetch: (remote: string) => Promise<this>;
|
7 | checkout: (remote: string, branch: string) => Promise<this>;
|
8 | rm: (files: string | string[]) => Promise<this>;
|
9 | add: (files: string | string[]) => Promise<this>;
|
10 | commit: (message: string) => Promise<this>;
|
11 | tag: (name: string) => Promise<this>;
|
12 | push: (remote: string, branch: string, force?: boolean) => Promise<this>;
|
13 | getRemoteUrl: (remote: string) => Promise<this>;
|
14 | deleteRef: (branch: string) => Promise<this>;
|
15 | clone: (repo: string, dir: string, branch: string, options: PublishOptions) => Promise<this>;
|
16 | }
|
17 | export interface PublishOptions {
|
18 | beforeAdd?: ((git: Git) => Promise<Git | undefined>) | null | undefined;
|
19 | add?: boolean | undefined;
|
20 | branch?: string | undefined;
|
21 | cname?: string | undefined;
|
22 | dest?: string | undefined;
|
23 | dotfiles?: boolean | undefined;
|
24 | git?: string | undefined;
|
25 | /**
|
26 | * Push force new commit without parent history
|
27 | * @default true
|
28 | */
|
29 | history?: boolean | undefined;
|
30 | message?: string | undefined;
|
31 | /** @default false */
|
32 | nojekyll?: boolean | undefined;
|
33 | only?: string | undefined;
|
34 | push?: boolean | undefined;
|
35 | remote?: string | undefined;
|
36 | /**
|
37 | * Removes files that match the given pattern (Ignored if used together with --add).
|
38 | * By default, gh-pages removes everything inside the target branch auto-generated directory before copying the new files from dir.
|
39 | * @default '.'
|
40 | */
|
41 | remove?: string | undefined;
|
42 | repo?: string | undefined;
|
43 | silent?: boolean | undefined;
|
44 | src?: string | string[] | undefined;
|
45 | tag?: string | undefined;
|
46 | user?:
|
47 | | null
|
48 | | {
|
49 | name: string;
|
50 | email: string;
|
51 | }
|
52 | | undefined;
|
53 | }
|
54 |
|
55 | /**
|
56 | * Get the cache directory.
|
57 | */
|
58 | export function getCacheDir(optPath?: string): string;
|
59 | export function publish(basePath: string, callback: (err: any) => void): Promise<void>;
|
60 | export function publish(basePath: string, config: PublishOptions, callback?: (err: any) => void): Promise<void>;
|
61 |
|
62 | export function clean(): void;
|
63 |
|
64 | export interface Defaults {
|
65 | beforeAdd: null;
|
66 | dest: ".";
|
67 | add: false;
|
68 | git: "git";
|
69 | depth: 1;
|
70 | dotfiles: false;
|
71 | branch: "gh-pages";
|
72 | remote: string;
|
73 | src: "**/*";
|
74 | remove: ".";
|
75 | push: true;
|
76 | history: true;
|
77 | message: "Updates";
|
78 | silent: false;
|
79 | }
|
80 |
|
81 | export const defaults: Readonly<Defaults>;
|
82 |
|
\ | No newline at end of file |