Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export Stream Deck api types #43

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,17 @@ function getOptions(input: string, output: string): RollupOptions[] {
];
}

export default [...getOptions("src/plugin/index.ts", "index.js"), ...getOptions("src/ui/index.ts", "browser.js")];
/**
* Provides declarations for Stream Deck API related types.
*/
const api = {
input: "src/api/index.ts",
output: {
banner,
file: "dist/api.d.ts"
},
external: ["@elgato/schemas/streamdeck/plugins"],
plugins: [dts()]
};

export default [...getOptions("src/plugin/index.ts", "index.js"), ...getOptions("src/ui/index.ts", "browser.js"), api];
7 changes: 1 addition & 6 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type * as schemas from "@elgato/schemas/streamdeck/plugins";

export * from "./command";
export * from "./device";
export * from "./events";
Expand All @@ -8,7 +6,4 @@ export * from "./layout";
export * from "./registration";
export * from "./target";

/**
* Defines the plugin and available actions, and all information associated with them, including the plugin's entry point, all iconography, action default behavior, etc.
*/
export type Manifest = Omit<schemas.Manifest, "$schema">;
export { type Manifest } from "@elgato/schemas/streamdeck/plugins";