MCPcopy Create free account
hub / github.com/bigcommerce/stencil-cli / run

Method run

lib/stencil-init.js:41–52  ·  view source on GitHub ↗

* @param {object} cliOptions * @param {string} cliOptions.normalStoreUrl * @param {string} cliOptions.accessToken * @param {number} cliOptions.port * @returns {Promise }

(cliOptions = {})

Source from the content-addressed store, hash-verified

39 * @returns {Promise<void>}
40 */
41 async run(cliOptions = {}) {
42 const oldStencilConfig = await this.readStencilConfig();
43 const defaultAnswers = this.getDefaultAnswers(oldStencilConfig);
44 const questions = this.getQuestions(defaultAnswers, cliOptions);
45 const answers = await this.askQuestions(questions);
46 const updatedStencilConfig = this.applyAnswers(oldStencilConfig, answers, cliOptions);
47 await this._stencilConfigManager.save(updatedStencilConfig);
48 await this.installDependencies(THEME_PATH, answers.packageManager, cliOptions);
49 this._logger.log(
50 'You are now ready to go! To start developing, run $ ' + 'stencil start'.cyan,
51 );
52 }
53
54 /**
55 * @returns {object}

Callers 11

_validateLangFilesMethod · 0.45
_validateCssFilesMethod · 0.45
stencil-init.jsFile · 0.45
stencil-debug.jsFile · 0.45
runFunction · 0.45
stencil-release.jsFile · 0.45

Calls 8

readStencilConfigMethod · 0.95
getDefaultAnswersMethod · 0.95
getQuestionsMethod · 0.95
askQuestionsMethod · 0.95
applyAnswersMethod · 0.95
installDependenciesMethod · 0.95
saveMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected