@create-node-app/core 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -350,10 +350,11 @@ var getTemplateDirPath = async (templateOrExtensionUrl) => {
|
|
|
350
350
|
);
|
|
351
351
|
let templateDirPath = import_path2.default.resolve(dir, subdir);
|
|
352
352
|
const templateDirPathWithTemplate = import_path2.default.resolve(templateDirPath, "template");
|
|
353
|
-
return new Promise((resolve
|
|
354
|
-
import_fs2.default.stat(templateDirPathWithTemplate, (
|
|
355
|
-
if (
|
|
356
|
-
|
|
353
|
+
return new Promise((resolve) => {
|
|
354
|
+
import_fs2.default.stat(templateDirPathWithTemplate, (_err, stats) => {
|
|
355
|
+
if (_err) {
|
|
356
|
+
resolve(templateDirPath);
|
|
357
|
+
return;
|
|
357
358
|
}
|
|
358
359
|
if (stats.isDirectory()) {
|
|
359
360
|
templateDirPath = templateDirPathWithTemplate;
|
package/dist/index.mjs
CHANGED
|
@@ -322,10 +322,11 @@ var getTemplateDirPath = async (templateOrExtensionUrl) => {
|
|
|
322
322
|
);
|
|
323
323
|
let templateDirPath = path2.resolve(dir, subdir);
|
|
324
324
|
const templateDirPathWithTemplate = path2.resolve(templateDirPath, "template");
|
|
325
|
-
return new Promise((resolve
|
|
326
|
-
fs2.stat(templateDirPathWithTemplate, (
|
|
327
|
-
if (
|
|
328
|
-
|
|
325
|
+
return new Promise((resolve) => {
|
|
326
|
+
fs2.stat(templateDirPathWithTemplate, (_err, stats) => {
|
|
327
|
+
if (_err) {
|
|
328
|
+
resolve(templateDirPath);
|
|
329
|
+
return;
|
|
329
330
|
}
|
|
330
331
|
if (stats.isDirectory()) {
|
|
331
332
|
templateDirPath = templateDirPathWithTemplate;
|