From d2ff2ec9c6e3a8758a8442eb1e9ddad5096ee9cf Mon Sep 17 00:00:00 2001 From: d98762625 Date: Fri, 5 Jul 2019 10:22:14 +0100 Subject: [PATCH] improve comments and re-add some excluded operations --- src/node/NodeDish.mjs | 5 +++-- src/node/NodeRecipe.mjs | 2 +- src/node/config/excludedOperations.mjs | 8 ++------ src/node/config/scripts/generateNodeIndex.mjs | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/node/NodeDish.mjs b/src/node/NodeDish.mjs index ea39b774..916092b4 100644 --- a/src/node/NodeDish.mjs +++ b/src/node/NodeDish.mjs @@ -8,8 +8,9 @@ import util from "util"; import Dish from "../core/Dish"; /** - * Subclass of Dish where `get` and `_translate` are synchronous. - * Also define functions to improve coercion behaviour. + * Subclass of Dish for use in the Node.js environment. + * + * Adds some helper functions and improves coercion for Node.js logging. */ class NodeDish extends Dish { diff --git a/src/node/NodeRecipe.mjs b/src/node/NodeRecipe.mjs index 070c5433..1e0d216a 100644 --- a/src/node/NodeRecipe.mjs +++ b/src/node/NodeRecipe.mjs @@ -78,7 +78,7 @@ class NodeRecipe { */ execute(dish) { return this.opList.reduce((prev, curr) => { - // CASE where opLis item is op and args + // CASE where opList item is op and args if (curr.hasOwnProperty("op") && curr.hasOwnProperty("args")) { return curr.op(prev, curr.args); } diff --git a/src/node/config/excludedOperations.mjs b/src/node/config/excludedOperations.mjs index e4ec6390..f9873eaf 100644 --- a/src/node/config/excludedOperations.mjs +++ b/src/node/config/excludedOperations.mjs @@ -6,6 +6,7 @@ * @license Apache-2.0 */ export default [ + // This functionality can be done more easily using JavaScript "Fork", "Merge", "Jump", @@ -18,11 +19,6 @@ export default [ "JavaScriptMinify", "JavaScriptParser", - // Relies on state of recipe. - // "Magic", - - "RenderImage", + // Irrelevant in Node console "SyntaxHighlighter", - - "DetectFileType", ]; diff --git a/src/node/config/scripts/generateNodeIndex.mjs b/src/node/config/scripts/generateNodeIndex.mjs index f188f326..6f3bf006 100644 --- a/src/node/config/scripts/generateNodeIndex.mjs +++ b/src/node/config/scripts/generateNodeIndex.mjs @@ -31,7 +31,7 @@ let code = `/** * THIS FILE IS AUTOMATICALLY GENERATED BY src/node/config/scripts/generateNodeIndex.mjs * * @author d98762625 [d98762625@gmail.com] -* @copyright Crown Copyright ${new Date().getUTCFullYear()} +* @copyright Crown Copyright 2019 * @license Apache-2.0 */