Skip to content

Commit 1d85f05

Browse files
committed
async publish/configure
1 parent b15ecac commit 1d85f05

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

src/command/publish/ghpages.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export const ghpagesProvider: PublishProvider = {
2525
configure: ghpagesConfigure,
2626
};
2727

28-
function ghpagesConfigure(options: PublishOptions) {
28+
function ghpagesConfigure(options: PublishOptions): Promise<void> {
2929
console.log("ghpages");
3030
console.log(options);
31+
return Promise.resolve();
3132
}

src/command/publish/netlify.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
import { Command } from "cliffy/command/mod.ts";
9+
import { netlifyPublish } from "../../publish/netlify.ts";
910

1011
import { PublishOptions, PublishProvider } from "./provider.ts";
1112

@@ -15,8 +16,8 @@ export const netlifyProvider: PublishProvider = {
1516
command: (command: Command) => {
1617
return command
1718
// deno-lint-ignore no-explicit-any
18-
.action((options: any, path?: string) => {
19-
netlifyConfigure({
19+
.action(async (options: any, path?: string) => {
20+
await netlifyConfigure({
2021
path: path || Deno.cwd(),
2122
render: !!options.render,
2223
});
@@ -25,7 +26,8 @@ export const netlifyProvider: PublishProvider = {
2526
configure: netlifyConfigure,
2627
};
2728

28-
function netlifyConfigure(options: PublishOptions) {
29+
async function netlifyConfigure(options: PublishOptions) {
2930
console.log("netlify");
3031
console.log(options);
32+
await netlifyPublish();
3133
}

src/command/publish/provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export interface PublishProvider {
1717
description: string;
1818
// deno-lint-ignore no-explicit-any
1919
command: (command: Command<any>) => Command<any>;
20-
configure: (options: PublishOptions) => void;
20+
configure: (options: PublishOptions) => Promise<void>;
2121
}

src/publish/ghpages.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ export interface GhpagesOptions {
99
site: string;
1010
}
1111

12-
export function ghpagesPublish(options: GhpagesOptions) {
12+
export function ghpagesPublish(_options: GhpagesOptions): Promise<void> {
13+
return Promise.resolve();
1314
}

src/publish/netlify.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*
66
*/
77

8+
import { NetlifyClient } from "./netlify/index.ts";
9+
810
export interface NetlifyOptions {
911
site: string;
1012
}
1113

12-
export function netlifyPublish(options: NetlifyOptions) {
14+
export async function netlifyPublish(_options?: NetlifyOptions) {
1315
}

0 commit comments

Comments
 (0)