Skip to content

Commit

Permalink
Null check on asset group name
Browse files Browse the repository at this point in the history
  • Loading branch information
Skrypt committed Jan 8, 2025
1 parent 52c1b2b commit 2995718
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .scripts/assets-build-tool/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if (task === "build" || task === "watch") {
chalk.yellow("Building Parcel bundles: "),
_.keys(parcelGroupsByBundle).join(", ")
);

groups.push({
action: "parcel",
name: `orchardcore-bundle`,
Expand Down Expand Up @@ -133,7 +133,7 @@ const buildProcesses = groups
}
return {
order: group.order,
name: group.name,
name: group.name ?? "PARCEL",
command: `node ${path.join(
__dirname,
"parcel.mjs"
Expand All @@ -144,7 +144,7 @@ const buildProcesses = groups
if (script) {
const cmd = {
order: group.order,
name: group.name,
name: group.name ?? "RUN",
command: `cd ${group.source} && ${script}`,
};
console.log("run command: ", cmd);
Expand All @@ -162,7 +162,7 @@ const buildProcesses = groups
if (task === "copy" || task === "build" || task === "dry-run") {
return {
order: group.order,
name: group.name,
name: group.name ?? "COPY",
command: `node ${path.join(
__dirname,
"copy.mjs"
Expand All @@ -180,7 +180,7 @@ const buildProcesses = groups
if (task === "copy" || task === "build" || task === "dry-run") {
return {
order: group.order,
name: group.name,
name: group.name ?? "MIN",
command: `node ${path.join(
__dirname,
"min.mjs"
Expand All @@ -198,7 +198,7 @@ const buildProcesses = groups
if (task === "copy" || task === "build" || task === "dry-run") {
return {
order: group.order,
name: group.name,
name: group.name ?? "SASS",
command: `node ${path.join(
__dirname,
"sass.mjs"
Expand Down
2 changes: 1 addition & 1 deletion .scripts/assets-build-tool/sass.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as sass from "sass";

let action = process.argv[2];
const config = JSON5.parse(Buffer.from(process.argv[3], "base64").toString("utf-8"));
const dest = config.dest ?? config.basePath + "wwwroot/Styles/";
const dest = config.dest ?? config.basePath + "/wwwroot/Styles/";

if (config.dryRun) {
action = "dry-run";
Expand Down

0 comments on commit 2995718

Please sign in to comment.