Skip to content

Commit

Permalink
refactor(command): add exports for completions and upgrade provider (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar authored May 14, 2024
1 parent b976d26 commit 6d08b9a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
9 changes: 8 additions & 1 deletion command/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
"exports": {
".": "./mod.ts",
"./completions": "./completions/mod.ts",
"./completions/bash": "./completions/bash.ts",
"./completions/fish": "./completions/fish.ts",
"./completions/zsh": "./completions/zsh.ts",
"./help": "./help/mod.ts",
"./upgrade": "./upgrade/mod.ts"
"./upgrade": "./upgrade/mod.ts",
"./upgrade/provider/deno-land": "./upgrade/provider/deno_land.ts",
"./upgrade/provider/github": "./upgrade/provider/github.ts",
"./upgrade/provider/jsr": "./upgrade/provider/jsr.ts",
"./upgrade/provider/nest-land": "./upgrade/provider/nest_land.ts"
},
"lock": false
}
14 changes: 0 additions & 14 deletions command/upgrade/mod.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
export {
DenoLandProvider,
type DenoLandProviderOptions,
} from "./provider/deno_land.ts";
export {
GithubProvider,
type GithubProviderOptions,
type GithubVersions,
} from "./provider/github.ts";
export { JsrProvider, type JsrProviderOptions } from "./provider/jsr.ts";
export {
NestLandProvider,
type NestLandProviderOptions,
} from "./provider/nest_land.ts";
export { Provider, type UpgradeOptions, type Versions } from "./provider.ts";
export {
UpgradeCommand,
Expand Down
8 changes: 3 additions & 5 deletions examples/command/upgrade_command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import { CompletionsCommand } from "../../command/completions/mod.ts";
import { Command } from "../../command/mod.ts";
import {
DenoLandProvider,
NestLandProvider,
UpgradeCommand,
} from "../../command/upgrade/mod.ts";
import { UpgradeCommand } from "../../command/upgrade/mod.ts";
import { DenoLandProvider } from "../../command/upgrade/provider/deno_land.ts";
import { GithubProvider } from "../../command/upgrade/provider/github.ts";
import { NestLandProvider } from "../../command/upgrade/provider/nest_land.ts";

await new Command()
.name("codeview")
Expand Down

0 comments on commit 6d08b9a

Please sign in to comment.