Skip to content

Commit

Permalink
Merge branch 'master' into refactor_customFilter.js
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Oct 9, 2024
2 parents 6c90b46 + 950f4c8 commit 95dda3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/generator/lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ class Generator {

try {
installedPkg = getTemplateDetails(this.templateName, PACKAGE_JSON_FILENAME);
pkgPath = installedPkg && installedPkg.pkgPath;
packageVersion = installedPkg && installedPkg.version;
pkgPath = installedPkg?.pkgPath;
packageVersion = installedPkg?.version;
log.debug(logMessage.templateSource(pkgPath));
if (packageVersion) log.debug(logMessage.templateVersion(packageVersion));

Expand Down
4 changes: 2 additions & 2 deletions apps/generator/lib/logMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const TEMPLATE_INSTALL_FLAG_MSG = 'because you passed --install flag';

const TEMPLATE_INSTALL_DISK_MSG = 'because the template cannot be found on disk';

const NODE_MODULES_INSTALL ='Remember that your local template must have its own node_modules installed first, \"npm install\" is not triggered by the generator.';
const NODE_MODULES_INSTALL = 'Remember that your local template must have its own node_modules installed first, "npm install" is not triggered by the generator.';

const NPM_INSTALL_TRIGGER = 'Installation of template located on disk technically means symlink creation betweed node_modules of the generator and template sources. Your local template must have its own node_modules, "npm install" is not triggered.';

Expand All @@ -19,7 +19,7 @@ function templateNotFound(templateName) {
}

function packageNotAvailable(packageDetails) {
if (packageDetails && packageDetails.pkgPath) {
if (packageDetails?.pkgPath) {
return `Unable to resolve template location at ${packageDetails.pkgPath}. Package is not available locally.`;
}

Expand Down

0 comments on commit 95dda3c

Please sign in to comment.