Skip to content

Commit

Permalink
Enable declarationMap for better DX
Browse files Browse the repository at this point in the history
  • Loading branch information
HuakunShen committed Jun 20, 2024
1 parent d022366 commit a0e8754
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-system-info"
version = "2.0.0-beta.1"
version = "2.0.1"
authors = ["You"]
edition = "2021"
rust-version = "1.70"
Expand Down
1 change: 1 addition & 0 deletions dist-js/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ export declare function refreshCpu(): Promise<void>;
export declare function refreshProcesses(): Promise<void>;
export declare function debugCommand(): Promise<unknown>;
export declare function batteries(): Promise<Battery>;
//# sourceMappingURL=api.d.ts.map
1 change: 1 addition & 0 deletions dist-js/api.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist-js/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./api";
export * from "./type";
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions dist-js/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist-js/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -942,3 +942,4 @@ export declare const AllSystemInfo: z.ZodObject<{
}[];
}>;
export type AllSystemInfo = z.infer<typeof AllSystemInfo>;
//# sourceMappingURL=type.d.ts.map
1 change: 1 addition & 0 deletions dist-js/type.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.13",
"tauri-plugin-system-info-api": "file:../.."
"tauri-plugin-system-info-api": "link:../../"
},
"type": "module"
}
12 changes: 2 additions & 10 deletions examples/sveltekit/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"name": "tauri-plugin-system-info-api",
"version": "2.0.0-beta.1",
"author": "You",
"description": "",
"version": "2.0.1",
"author": "Huakun",
"description": "System Info Plugin for Tauri Apps",
"repository": {
"type": "git",
"url": "https://github.com/HuakunShen/tauri-plugin-system-info.git"
},
"type": "module",
"types": "./dist-js/index.d.ts",
"main": "./dist-js/index.cjs",
Expand All @@ -14,6 +18,7 @@
},
"files": [
"dist-js",
"guest-js",
"README.md"
],
"scripts": {
Expand Down
5 changes: 1 addition & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ export default {
}
],
plugins: [
typescript({
declaration: true,
declarationDir: `./${pkg.exports.import.split('/')[0]}`
})
typescript()
],
external: [
/^@tauri-apps\/api/,
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"strict": true,
"noUnusedLocals": true,
"noImplicitAny": true,
"noEmit": true
"noEmit": true,
"declaration": true,
"declarationMap": true,
"outDir": "dist-js",
},
"include": ["guest-js/*.ts"],
"exclude": ["dist-js", "node_modules"]
Expand Down

0 comments on commit a0e8754

Please sign in to comment.