Skip to content

Commit

Permalink
Fix PerpareOptions -> PrepareOptions typo (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Oct 13, 2020
1 parent 87b9938 commit b831868
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ The API needs to provide some plug-in information, including the name of the plu
```ts
import {
prepare,
PerpareOptions,
PrepareOptions,
} from "https://deno.land/x/plugin_prepare@v0.6.0/mod.ts";

const releaseUrl =
"https://github.com/manyuanrong/deno-plugin-prepare/releases/download/plugin_bins";

const pluginOptions: PerpareOptions = {
const pluginOptions: PrepareOptions = {
name: "test_plugin",

// Whether to output log. Optional, default is true
Expand Down
6 changes: 3 additions & 3 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PLUGIN_SUFFIX_MAP: { [os in typeof Deno.build.os]: string } = {

const pluginSuffix = PLUGIN_SUFFIX_MAP[os];

export interface PerpareOptions {
export interface PrepareOptions {
name: string;
printLog?: boolean;
checkCache?: boolean;
Expand All @@ -21,7 +21,7 @@ export interface PerpareOptions {
};
}

export async function download(options: PerpareOptions): Promise<string> {
export async function download(options: PrepareOptions): Promise<string> {
const { name, urls, checkCache = true } = options;

const remoteUrl = urls[os];
Expand Down Expand Up @@ -51,7 +51,7 @@ export async function download(options: PerpareOptions): Promise<string> {
return localPath;
}

export async function prepare(options: PerpareOptions): Promise<number> {
export async function prepare(options: PrepareOptions): Promise<number> {
const { name, printLog = true } = options;

if (printLog) {
Expand Down
4 changes: 2 additions & 2 deletions tests/util.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { PerpareOptions, prepare } from "../mod.ts";
import { PrepareOptions, prepare } from "../mod.ts";
import { assertEquals } from "../test_deps.ts";

const textDecoder = new TextDecoder();

export async function testPrepare(releaseUrl: string) {
const pluginOptions: PerpareOptions = {
const pluginOptions: PrepareOptions = {
name: "test_plugin",
printLog: true,
urls: {
Expand Down

0 comments on commit b831868

Please sign in to comment.