-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjss-create.js
21 lines (18 loc) · 956 Bytes
/
jss-create.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const { applyNameToProject } = require('@sitecore-jss/sitecore-jss-cli/dist/create');
/**
* This function is invoked by `jss create` when an app based on this template is created.
* It should perform tasks necessary to instantiate the app according to the argv, which
* correspond to the allowed arguments of `jss create`.
*
* Note: npm packages for the new app are already installed before this script is run.
* Note: this file is deleted in the new app after it has been run.
*
* @param {object} argv Arguments passed to `jss create` script
* @param {string[]} nextSteps Array of default 'next steps' to show at the console
* @returns {string[]} The next steps to display to the console user (enables customization from this script)
*/
module.exports = function createJssProject(argv, nextSteps) {
console.log(`Executing create script: ${__filename}...`);
applyNameToProject(__dirname, argv.name, argv.hostName);
return nextSteps;
};