Skip to content

Commit

Permalink
remove unnecessary check of existing rd.json on build
Browse files Browse the repository at this point in the history
  • Loading branch information
bmsuseluda committed Jul 2, 2021
1 parent 291b553 commit 53084ad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
16 changes: 5 additions & 11 deletions dist_scripts/scripts/buildRadar.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,8 @@ var buildTemplate = function () {
process.chdir(paths.template);
return runCommand(packageManager + " build");
};
if (fs.existsSync(paths.appRdJson)) {
buildTemplate().then(function () {
fs.copySync(paths.templateBuild, paths.appBuild);
fs.copySync(paths.appPublic, paths.appBuild);
console.log(paths.appBuild + " was created and can be deployed.");
});
}
else {
console.error(paths.appRdJson + " does not exist. You have to generate it first.");
process.exit(1);
}
buildTemplate().then(function () {
fs.copySync(paths.templateBuild, paths.appBuild);
fs.copySync(paths.appPublic, paths.appBuild);
console.log(paths.appBuild + " was created and can be deployed.");
});
2 changes: 1 addition & 1 deletion dist_scripts/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports.showEmptyRings = false;
var messages = {
"languages-and-frameworks": "Languages & Frameworks",
"methods-and-patterns": "Methods & Patterns",
"platforms-and-aoe-services": "Platforms and Operations",
"platforms-and-aoe-services": "Platforms & Operations",
tools: "Tools",
};
var translate = function (key) { return messages[key] || "-"; };
Expand Down
17 changes: 5 additions & 12 deletions scripts/buildRadar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,8 @@ const buildTemplate = () => {
return runCommand(`${packageManager} build`);
};

if (fs.existsSync(paths.appRdJson)) {
buildTemplate().then(() => {
fs.copySync(paths.templateBuild, paths.appBuild);
fs.copySync(paths.appPublic, paths.appBuild);
console.log(`${paths.appBuild} was created and can be deployed.`);
});
} else {
console.error(
`${paths.appRdJson} does not exist. You have to generate it first.`
);
process.exit(1);
}
buildTemplate().then(() => {
fs.copySync(paths.templateBuild, paths.appBuild);
fs.copySync(paths.appPublic, paths.appBuild);
console.log(`${paths.appBuild} was created and can be deployed.`);
});

0 comments on commit 53084ad

Please sign in to comment.