add const

This commit is contained in:
weboko 2022-12-06 22:46:16 +01:00 committed by weboko
parent f08d49542b
commit 922c8d0d1a
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ const execSync = require("child_process").execSync;
const { Command } = require("commander");
const validateProjectName = require("validate-npm-package-name");
const DEFAULT_TEMPLATE = "web-chat";
const supportedExamplesDir = path.resolve(__dirname, "./examples");
const init = (name, description, version, supportedExamples) => {
@ -25,7 +26,7 @@ const init = (name, description, version, supportedExamples) => {
.parse();
const options = program.opts();
const template = options.template || "web-chat";
const template = options.template || DEFAULT_TEMPLATE;
if (!supportedExamples[template]) {
const supportedExamplesMessage = Object.keys(supportedExamples).reduce((acc, v) => {