Skip to content

Commit

Permalink
adding more value to basic files
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentmorneau committed Oct 29, 2020
1 parent 248c888 commit 23d83e1
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions lib/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 23d83e1

Please sign in to comment.