From 23d83e17ea622155e8fe18b0df53ced37c2e5404 Mon Sep 17 00:00:00 2001 From: Vincent Morneau Date: Thu, 29 Oct 2020 09:48:25 -0400 Subject: [PATCH] adding more value to basic files --- lib/commands/init.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/commands/init.js b/lib/commands/init.js index 74a14ae..c60a6ac 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -54,12 +54,27 @@ ${config.appName}.p1 = { * @example ${config.appName}.p1.init(); **/ init: function () { - console.log('Hello World'); + console.log('Hello from page 1'); + } +}; + +/** +* @module p2 +**/ +${config.appName}.p2 = { + /** + * @function init + * @example ${config.appName}.p2.init(); + **/ + init: function () { + console.log('Hello from page 2'); } }; $(document).ready(function () { - ${config.appName}.p1.init(); + var pageId = Number(document.getElementById("pFlowStepId").value); + if (pageId === 1) ${config.appName}.p1.init(); + if (pageId === 2) ${config.appName}.p2.init(); });` ); await fs.writeFile(