Make help function use OperationConfig.json file

Tidy up Gruntfile execs
This commit is contained in:
d98762625 2018-07-06 11:13:38 +01:00
parent f101eefc56
commit 2480dca473
8 changed files with 1396 additions and 165 deletions

View file

@ -28,7 +28,7 @@ if (!fs.existsSync(dir)) {
}
let code = `/**
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateOpsIndex.mjs
* THIS FILE IS AUTOMATICALLY GENERATED BY src/node/config/scripts/generateNodeIndex.mjs
*
* @author d98762625 [d98762625@gmail.com]
* @copyright Crown Copyright ${new Date().getUTCFullYear()}
@ -79,14 +79,7 @@ code += ` };
}
const chef = generateChef();
chef.help = help([\n`;
includedOperations.forEach((op) => {
code += ` core_${op},\n`;
});
code +=`]);
chef.help = help;
`;
includedOperations.forEach((op) => {
@ -108,6 +101,6 @@ code += "};\n";
fs.writeFileSync(
path.join(dir, "/index.mjs"),
path.join(dir, "./index.mjs"),
code
);