Skip to content
This repository was archived by the owner on Dec 21, 2022. It is now read-only.

Commit a0c2dbd

Browse files
author
Illia Obukhau
authored
Merge pull request #1646 from mendix/feat/add-language-selector-to-atlas-core-release-script
chore: add language-selector to atlas-core script
2 parents 9965c1e + be4d701 commit a0c2dbd

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

packages/modules/atlas-core/scripts/build.ts

+10-11
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,16 @@ async function buildAndCopyWidgets(command = "build", widgets: string[] = [], de
5252
if (cwd.endsWith("atlas-core")) {
5353
cwd = join(cwd, "../../../");
5454
}
55-
execSync(
56-
`${
57-
command !== "release" && destination ? `npx cross-env MX_PROJECT_PATH=${destination} ` : ""
58-
}npm run ${command} -- --scope '${
59-
widgets.length > 1 ? `{${widgets.join(",")}}` : widgets.join("")
60-
}' --include-dependencies`,
61-
{
62-
stdio: "inherit",
63-
cwd
64-
}
65-
);
55+
const scope = `'${widgets.length > 1 ? `{${widgets.join(",")}}` : widgets.join("")}'`;
56+
const cmd = `npm run ${command} -- --scope=${scope} --include-dependencies`;
57+
const execSyncCmd =
58+
command !== "release" && destination ? `npx cross-env MX_PROJECT_PATH=${destination} ${cmd}` : cmd;
59+
60+
execSync(execSyncCmd, {
61+
stdio: "inherit",
62+
cwd
63+
});
64+
6665
if (command === "release") {
6766
const pluggableWidgetsFolderPath = join(cwd, "packages/pluggableWidgets");
6867
const mpkPathsToCopy = [];

scripts/release/createWebModules.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ async function createAtlasWebContentModule() {
101101
async function createAtlasCoreModule() {
102102
console.log("Creating the Atlas Core module.");
103103
execSync("npm run release:module", { stdio: "inherit", cwd: join(repoRootPath, "packages/modules", "atlas-core") });
104-
const widgets = ["feedback-native"].map(folder => join(repoRootPath, "packages/pluggableWidgets", folder));
104+
const widgets = ["feedback-native", "language-selector-web"].map(folder =>
105+
join(repoRootPath, "packages/pluggableWidgets", folder)
106+
);
105107
const moduleInfo = {
106108
...(await getPackageInfo(moduleFolder)),
107109
moduleNameInModeler: "Atlas_Core",

0 commit comments

Comments
 (0)