Skip to content

Commit 2e792e4

Browse files
committed
fix: copy using rollup plugin
1 parent b0f652f commit 2e792e4

File tree

15 files changed

+56
-290
lines changed

15 files changed

+56
-290
lines changed

License.txt renamed to LICENSE

File renamed without changes.

packages/pluggableWidgets/charts-web/scripts/build.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ async function repackChartWidgets({ config }: WidgetStepParams): Promise<void> {
3333

3434
console.log("Copying package.xml...");
3535
cp(join(paths.package, "src", "package.xml"), join(paths.tmp, "package.xml"));
36+
console.log("Copying License.txt...");
37+
cp(join(paths.package, "../../../LICENSE"), join(paths.tmp, "License.txt"));
3638
console.log("Creating mpk...");
3739
await zip(paths.tmp, output.files.mpk);
3840
}

packages/pluggableWidgets/combobox-web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"@mendix/eslint-config-web-widgets": "workspace:*",
5757
"@mendix/pluggable-widgets-tools": "*",
5858
"@mendix/prettier-config-web-widgets": "workspace:*",
59+
"@mendix/rollup-web-widgets": "workspace:*",
5960
"@mendix/run-e2e": "workspace:^*",
6061
"@mendix/widget-plugin-component-kit": "workspace:*",
6162
"@mendix/widget-plugin-grid": "workspace:*",
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { copyDefaultFiles } from "@mendix/rollup-web-widgets/helper.mjs";
1+
import copyFiles from "@mendix/rollup-web-widgets/copyFiles.mjs";
22

33
export default args => {
4-
const result = args.configDefaultConfig;
5-
copyDefaultFiles(import.meta.dirname);
6-
return result;
4+
return copyFiles(args);
75
};

packages/pluggableWidgets/document-viewer-web/rollup.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import commonjs from "@rollup/plugin-commonjs";
22
import replace from "@rollup/plugin-replace";
3-
import { copyDefaultFiles } from "@mendix/rollup-web-widgets/helper.mjs";
3+
import { copyDefaultFilesPlugin } from "@mendix/rollup-web-widgets/copyFiles.mjs";
44

55
export default args => {
66
const result = args.configDefaultConfig;
7-
copyDefaultFiles(import.meta.dirname);
87
return result.map((config, _index) => {
98
config.output.inlineDynamicImports = true;
109
if (config.output.format !== "es") {
@@ -43,7 +42,8 @@ export default args => {
4342
// Tree-shake client worker initialization logic.
4443
"!PDFWorkerUtil.isWorkerDisabled && !PDFWorker.#mainThreadWorkerMessageHandler": "false"
4544
}
46-
})
45+
}),
46+
copyDefaultFilesPlugin()
4747
]
4848
};
4949
});
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { copyDefaultFiles } from "@mendix/rollup-web-widgets/helper.mjs";
1+
import copyFiles from "@mendix/rollup-web-widgets/copyFiles.mjs";
22

33
export default args => {
4-
const result = args.configDefaultConfig;
5-
copyDefaultFiles(import.meta.dirname);
6-
return result;
4+
return copyFiles(args);
75
};

packages/pluggableWidgets/maps-web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"@mendix/eslint-config-web-widgets": "workspace:*",
5656
"@mendix/pluggable-widgets-tools": "*",
5757
"@mendix/prettier-config-web-widgets": "workspace:*",
58+
"@mendix/rollup-web-widgets": "workspace:*",
5859
"@mendix/run-e2e": "workspace:*",
5960
"@mendix/widget-plugin-component-kit": "workspace:*",
6061
"@mendix/widget-plugin-platform": "workspace:*",

packages/pluggableWidgets/maps-web/rollup.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { mkdirSync } from "node:fs";
22
import { fileURLToPath } from "url";
3+
import copyFiles from "@mendix/rollup-web-widgets/copyFiles.mjs";
34

45
export default args => {
5-
const result = args.configDefaultConfig;
6+
const result = copyFiles(args);
7+
68
const [jsConfig, mJsConfig] = result;
79

810
const folderUrl = new URL("dist/tmp/widgets/com/mendix/widget/custom/Maps/", import.meta.url);
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { copyDefaultFiles } from "@mendix/rollup-web-widgets/helper.mjs";
1+
import copyFiles from "@mendix/rollup-web-widgets/copyFiles.mjs";
22

33
export default args => {
4-
const result = args.configDefaultConfig;
5-
copyDefaultFiles(import.meta.dirname);
6-
return result;
4+
return copyFiles(args);
75
};

packages/pluggableWidgets/rich-text-web/rollup.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import typescript from "@rollup/plugin-typescript";
22
import preserveDirectives from "rollup-preserve-directives";
33
import alias from "@rollup/plugin-alias";
4-
import { copyDefaultFiles } from "@mendix/rollup-web-widgets/helper.mjs";
4+
import { copyDefaultFilesPlugin } from "@mendix/rollup-web-widgets/copyFiles.mjs";
55

66
export default args => {
77
const result = args.configDefaultConfig;
8-
copyDefaultFiles(import.meta.dirname);
98
return result.map((config, _index) => {
109
config.plugins = [
1110
...config.plugins.filter(plugin => plugin?.name !== "typescript"),
@@ -25,7 +24,8 @@ export default args => {
2524
target: "es2022", // we transpile the result with babel anyway, see below
2625
useDefineForClassFields: false,
2726
exclude: ["**/__tests__/**/*"]
28-
})
27+
}),
28+
copyDefaultFilesPlugin()
2929
];
3030

3131
return config;

0 commit comments

Comments
 (0)