mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
feat(gh-pages): update to version 2.2 (#43157)
- new `history` option - missing `remove` option - tests refreshed https://github.com/tschaub/gh-pages/compare/v2.0.0...v2.2.0 Thanks!
This commit is contained in:
parent
b2d4d29f9f
commit
d57a578cdc
@ -1,15 +1,25 @@
|
||||
import ghPages = require("gh-pages");
|
||||
/// <reference types="node" />
|
||||
import ghpages = require('gh-pages');
|
||||
|
||||
const dir = "./";
|
||||
const dir = './';
|
||||
const emptyOptions = {};
|
||||
const callback = (err: any) => { };
|
||||
const callback = (err: any) => {};
|
||||
|
||||
ghPages.publish(dir, callback);
|
||||
ghPages.publish(dir, emptyOptions, callback);
|
||||
|
||||
ghPages.publish("dist", {
|
||||
user: {
|
||||
name: "Daniel",
|
||||
email: "daniel@example.com"
|
||||
}
|
||||
}, callback);
|
||||
ghpages.publish(dir, callback);
|
||||
ghpages.publish(dir, emptyOptions, callback);
|
||||
ghpages.publish('dist', { history: false }, callback);
|
||||
ghpages.publish(
|
||||
'dist',
|
||||
{
|
||||
remove: '*.json',
|
||||
repo: `https://${process.env.GH_TOKEN}@github.com/user/private-repo.git`,
|
||||
silent: true,
|
||||
git: '/path/to/git',
|
||||
user: {
|
||||
name: 'Daniel',
|
||||
email: 'daniel@example.com',
|
||||
},
|
||||
history: true,
|
||||
},
|
||||
callback,
|
||||
);
|
||||
|
||||
25
types/gh-pages/index.d.ts
vendored
25
types/gh-pages/index.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
// Type definitions for gh-pages 2.0
|
||||
// Type definitions for gh-pages 2.2
|
||||
// Project: https://github.com/tschaub/gh-pages
|
||||
// Definitions by: Daniel Rosenwasser <https://github.com/DanielRosenwasser>
|
||||
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface PublishOptions {
|
||||
@ -9,26 +10,32 @@ export interface PublishOptions {
|
||||
dest?: string;
|
||||
dotfiles?: boolean;
|
||||
git?: string;
|
||||
/**
|
||||
* Push force new commit without parent history
|
||||
* @default true
|
||||
*/
|
||||
history?: boolean;
|
||||
message?: string;
|
||||
only?: string;
|
||||
push?: boolean;
|
||||
remote?: string;
|
||||
/**
|
||||
* Removes files that match the given pattern (Ignored if used together with --add).
|
||||
* By default, gh-pages removes everything inside the target branch auto-generated directory before copying the new files from dir.
|
||||
* @default '.'
|
||||
*/
|
||||
remove?: string;
|
||||
repo?: string;
|
||||
silent?: boolean;
|
||||
src?: string | string[];
|
||||
tag?: string;
|
||||
user?: null | {
|
||||
name: string;
|
||||
email: string
|
||||
email: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function publish(
|
||||
basePath: string,
|
||||
callback: (err: any) => void): void;
|
||||
export function publish(
|
||||
basePath: string,
|
||||
config: PublishOptions,
|
||||
callback?: (err: any) => void): void;
|
||||
export function publish(basePath: string, callback: (err: any) => void): void;
|
||||
export function publish(basePath: string, config: PublishOptions, callback?: (err: any) => void): void;
|
||||
|
||||
export function clean(): void;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user