Skip to content

Commit

Permalink
refactor: simplify rollup config and match @tauri-apps/api output s…
Browse files Browse the repository at this point in the history
…tyle
  • Loading branch information
amrbashir committed Nov 13, 2023
1 parent d4d1633 commit 7d6e721
Show file tree
Hide file tree
Showing 102 changed files with 363 additions and 871 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-security": "1.7.1",
"prettier": "3.0.3",
"rollup": "4.1.4",
"rollup": "4.2.0",
"typescript": "5.2.2"
},
"resolutions": {
Expand Down
11 changes: 2 additions & 9 deletions plugins/authenticator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,19 @@
"Tauri Programme within The Commons Conservancy"
],
"type": "module",
"browser": "dist-js/index.min.js",
"module": "dist-js/index.mjs",
"types": "dist-js/index.d.ts",
"exports": {
"import": "./dist-js/index.mjs",
"types": "./dist-js/index.d.ts",
"browser": "./dist-js/index.min.js"
"import": "./dist-js/index.js",
"require": "./dist-js/index.cjs"
},
"scripts": {
"build": "rollup -c"
},
"files": [
"dist-js",
"!dist-js/**/*.map",
"README.md",
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.11"
}
Expand Down
3 changes: 3 additions & 0 deletions plugins/authenticator/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createConfig } from "../../shared/rollup.config.js";

export default createConfig();
11 changes: 0 additions & 11 deletions plugins/authenticator/rollup.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/authenticator/src/api-iife.js

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

11 changes: 2 additions & 9 deletions plugins/autostart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@
"Tauri Programme within The Commons Conservancy"
],
"type": "module",
"browser": "dist-js/index.min.js",
"module": "dist-js/index.mjs",
"types": "dist-js/index.d.ts",
"exports": {
"import": "./dist-js/index.mjs",
"types": "./dist-js/index.d.ts",
"browser": "./dist-js/index.min.js"
"import": "./dist-js/index.js",
"require": "./dist-js/index.cjs"
},
"scripts": {
"build": "rollup -c"
},
"files": [
"dist-js",
"!dist-js/**/*.map",
"README.md",
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.11"
}
Expand Down
3 changes: 3 additions & 0 deletions plugins/autostart/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createConfig } from "../../shared/rollup.config.js";

export default createConfig();
11 changes: 0 additions & 11 deletions plugins/autostart/rollup.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/autostart/src/api-iife.js

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

11 changes: 2 additions & 9 deletions plugins/barcode-scanner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,19 @@
"Tauri Programme within The Commons Conservancy"
],
"type": "module",
"browser": "dist-js/index.min.js",
"module": "dist-js/index.mjs",
"types": "dist-js/index.d.ts",
"exports": {
"import": "./dist-js/index.mjs",
"types": "./dist-js/index.d.ts",
"browser": "./dist-js/index.min.js"
"import": "./dist-js/index.js",
"require": "./dist-js/index.cjs"
},
"scripts": {
"build": "rollup -c"
},
"files": [
"dist-js",
"!dist-js/**/*.map",
"README.md",
"LICENSE"
],
"devDependencies": {
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.11"
}
Expand Down
3 changes: 3 additions & 0 deletions plugins/barcode-scanner/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createConfig } from "../../shared/rollup.config.js";

export default createConfig();
11 changes: 0 additions & 11 deletions plugins/barcode-scanner/rollup.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/barcode-scanner/src/api-iife.js

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

11 changes: 2 additions & 9 deletions plugins/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@
"Tauri Programme within The Commons Conservancy"
],
"type": "module",
"browser": "dist-js/index.min.js",
"module": "dist-js/index.mjs",
"types": "dist-js/index.d.ts",
"exports": {
"import": "./dist-js/index.mjs",
"types": "./dist-js/index.d.ts",
"browser": "./dist-js/index.min.js"
"import": "./dist-js/index.js",
"require": "./dist-js/index.cjs"
},
"scripts": {
"build": "rollup -c"
},
"files": [
"dist-js",
"!dist-js/**/*.map",
"README.md",
"LICENSE"
],
"devDependencies": {
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.11"
}
Expand Down
3 changes: 3 additions & 0 deletions plugins/cli/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createConfig } from "../../shared/rollup.config.js";

export default createConfig();
11 changes: 0 additions & 11 deletions plugins/cli/rollup.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/cli/src/api-iife.js

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

11 changes: 2 additions & 9 deletions plugins/clipboard-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@
"Tauri Programme within The Commons Conservancy"
],
"type": "module",
"browser": "dist-js/index.min.js",
"module": "dist-js/index.mjs",
"types": "dist-js/index.d.ts",
"exports": {
"import": "./dist-js/index.mjs",
"types": "./dist-js/index.d.ts",
"browser": "./dist-js/index.min.js"
"import": "./dist-js/index.js",
"require": "./dist-js/index.cjs"
},
"scripts": {
"build": "rollup -c"
},
"files": [
"dist-js",
"!dist-js/**/*.map",
"README.md",
"LICENSE"
],
"devDependencies": {
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.11"
}
Expand Down
3 changes: 3 additions & 0 deletions plugins/clipboard-manager/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createConfig } from "../../shared/rollup.config.js";

export default createConfig();
11 changes: 0 additions & 11 deletions plugins/clipboard-manager/rollup.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/clipboard-manager/src/api-iife.js

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

11 changes: 2 additions & 9 deletions plugins/deep-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,19 @@
"Tauri Programme within The Commons Conservancy"
],
"type": "module",
"browser": "dist-js/index.min.js",
"module": "dist-js/index.mjs",
"types": "dist-js/index.d.ts",
"exports": {
"import": "./dist-js/index.mjs",
"types": "./dist-js/index.d.ts",
"browser": "./dist-js/index.min.js"
"import": "./dist-js/index.js",
"require": "./dist-js/index.cjs"
},
"scripts": {
"build": "rollup -c"
},
"files": [
"dist-js",
"!dist-js/**/*.map",
"README.md",
"LICENSE"
],
"devDependencies": {
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.11"
}
Expand Down
3 changes: 3 additions & 0 deletions plugins/deep-link/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createConfig } from "../../shared/rollup.config.js";

export default createConfig();
11 changes: 0 additions & 11 deletions plugins/deep-link/rollup.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/deep-link/src/api-iife.js

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

11 changes: 2 additions & 9 deletions plugins/dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@
"Tauri Programme within The Commons Conservancy"
],
"type": "module",
"browser": "dist-js/index.min.js",
"module": "dist-js/index.mjs",
"types": "dist-js/index.d.ts",
"exports": {
"import": "./dist-js/index.mjs",
"types": "./dist-js/index.d.ts",
"browser": "./dist-js/index.min.js"
"import": "./dist-js/index.js",
"require": "./dist-js/index.cjs"
},
"scripts": {
"build": "rollup -c"
},
"files": [
"dist-js",
"!dist-js/**/*.map",
"README.md",
"LICENSE"
],
"devDependencies": {
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.11"
}
Expand Down
18 changes: 18 additions & 0 deletions plugins/dialog/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { createConfig } from "../../shared/rollup.config.js";
import { nodeResolve } from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
import terser from "@rollup/plugin-terser";

export default createConfig({
additionalConfigs: {
input: "guest-js/init.ts",
output: {
file: "src/init-iife.js",
format: "iife",
},
plugins: [typescript(), terser(), nodeResolve()],
onwarn: (warning) => {
throw Object.assign(new Error(), warning);
},
},
});
34 changes: 0 additions & 34 deletions plugins/dialog/rollup.config.mjs

This file was deleted.

Loading

0 comments on commit 7d6e721

Please sign in to comment.