Skip to content

Commit 07859ba

Browse files
committed
update deps & change project config
1 parent aa8730d commit 07859ba

4 files changed

Lines changed: 34 additions & 32 deletions

File tree

packages/mpx/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
"license": "Apache-2.0",
2727
"packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad",
2828
"devDependencies": {
29-
"@rollup/plugin-image": "^3.0.3",
30-
"@rollup/plugin-url": "^8.0.2",
3129
"@tsconfig/node22": "^22.0.2",
3230
"@types/node": "^24.0.13",
3331
"@types/postcss-import": "^14.0.3",
@@ -39,24 +37,23 @@
3937
"fast-glob": "^3.3.3",
4038
"filesize": "^11.0.1",
4139
"picocolors": "^1.1.1",
42-
"postcss": "^8.5.6",
4340
"premove": "^4.0.0",
4441
"prettier": "^3.6.2",
4542
"pretty-ms": "^9.2.0",
4643
"rolldown": "1.0.0-beta.26",
47-
"rollup-plugin-license": "^3.6.0",
48-
"rollup-plugin-postcss": "^4.0.2",
49-
"sass": "^1.89.2",
5044
"signal-exit": "^4.1.0",
5145
"typescript": "^5.8.3",
5246
"zip-a-folder": "^3.1.9",
5347
"zod": "^4.0.5"
5448
},
5549
"dependencies": {
50+
"@rollup/plugin-image": "^3.0.3",
51+
"@rollup/plugin-url": "^8.0.2",
5652
"postcss": "^8.5.6",
5753
"postcss-import": "^16.1.1",
5854
"postcss-url": "^10.1.3",
5955
"rolldown": "1.0.0-beta.26",
56+
"rollup-plugin-license": "^3.6.0",
6057
"rollup-plugin-postcss": "^4.0.2",
6158
"sass": "^1.89.2",
6259
"xml2js": "^0.6.2"

packages/mpx/pnpm-lock.yaml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mpx/src/utils/project-config.ts

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ interface BundleOutputFiles {
2626

2727
interface BundleOutputDirs {
2828
dist: string;
29+
tmpDir: string;
2930
mpkDir: string;
3031
contentRoot: string;
3132
widgetDir: string;
@@ -41,15 +42,6 @@ interface ProjectConfigInputs {
4142
export abstract class ProjectConfig {
4243
readonly projectPath: string | null = null;
4344

44-
/** Output directory for built files. */
45-
readonly dist = "dist";
46-
47-
/**
48-
* Package root directory that contains all widget files shipped with mpk.
49-
* By default "dist/tmp/widgets".
50-
*/
51-
readonly contentRoot = path.join(this.dist, "tmp", "widgets");
52-
5345
/** Widget package.json */
5446
readonly pkg: PackageJson;
5547

@@ -136,13 +128,26 @@ export abstract class ProjectConfig {
136128
}
137129

138130
get outputDirs(): BundleOutputDirs {
139-
const widgetDir = path.join(this.contentRoot, this.widgetDirectory);
131+
// dist
132+
const dist = "dist";
133+
// dist/tmp
134+
const tmpDir = path.join(dist, "tmp");
135+
// dist/tmp/widgets
136+
const contentRoot = path.join(tmpDir, "widgets");
137+
// dist/tmp/widgets/com/mendix/my/awesome/button
138+
const widgetDir = path.join(contentRoot, this.widgetDirectory);
139+
// dist/x.y.z
140+
const mpkDir = path.join(dist, this.pkg.version);
141+
// dist/widgets/com/mendix/my/awesome/button/assets
142+
const widgetAssetsDir = path.join(widgetDir, "assets");
143+
140144
return {
141-
dist: this.dist,
142-
mpkDir: path.join(this.dist, this.pkg.version),
143-
contentRoot: this.contentRoot,
145+
dist,
146+
tmpDir,
147+
mpkDir,
148+
contentRoot,
144149
widgetDir,
145-
widgetAssetsDir: path.join(widgetDir, "assets")
150+
widgetAssetsDir
146151
};
147152
}
148153

@@ -152,8 +157,8 @@ export abstract class ProjectConfig {
152157

153158
toPlainObject(): Record<string, unknown> {
154159
return {
155-
dist: this.dist,
156-
contentRoot: this.contentRoot,
160+
dist: this.outputDirs.dist,
161+
contentRoot: this.outputDirs.contentRoot,
157162
pkg: this.pkg,
158163
isTsProject: this.isTsProject,
159164
projectPath: this.projectPath,

packages/mpx/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "@tsconfig/node22/tsconfig.json",
33
"exclude": ["input"],
4-
"include": ["src/**/*", "../../../pluggable-widgets-tools/src/typings-generator"],
4+
"include": ["src/**/*"],
55
"compilerOptions": {
66
"noEmit": true,
77
"resolveJsonModule": true

0 commit comments

Comments
 (0)