vovk-cli 0.0.1-draft.77 → 0.0.1-draft.79
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.
|
@@ -3,7 +3,7 @@ export default function getClientTemplates({ config, cwd, templateNames = [], })
|
|
|
3
3
|
const templatesDir = path.join(import.meta.dirname, '../..', 'client-templates');
|
|
4
4
|
const clientOutDirAbsolutePath = path.resolve(cwd, config.clientOutDir);
|
|
5
5
|
const mapper = (dir) => (name) => ({
|
|
6
|
-
templateName:
|
|
6
|
+
templateName: dir,
|
|
7
7
|
templatePath: path.resolve(templatesDir, dir, name),
|
|
8
8
|
outPath: path.join(clientOutDirAbsolutePath, name.replace('.ejs', '')),
|
|
9
9
|
});
|
package/dist/generate/index.mjs
CHANGED
|
@@ -55,8 +55,8 @@ export default async function generate({ projectInfo, segments, segmentsSchema,
|
|
|
55
55
|
templateName,
|
|
56
56
|
};
|
|
57
57
|
}));
|
|
58
|
-
const usedTemplateNames = processedTemplates.filter(({ needsWriting }) => needsWriting);
|
|
59
|
-
const unusedTemplateNames = processedTemplates.filter(({ needsWriting }) => !needsWriting);
|
|
58
|
+
const usedTemplateNames = processedTemplates.filter(({ needsWriting }) => needsWriting).map(({ templateName }) => templateName);
|
|
59
|
+
const unusedTemplateNames = processedTemplates.filter(({ needsWriting }) => !needsWriting).map(({ templateName }) => templateName);
|
|
60
60
|
if (fullSchema || usedTemplateNames.length > 0) {
|
|
61
61
|
// Make sure the output directory exists
|
|
62
62
|
await fs.mkdir(clientOutDirAbsolutePath, { recursive: true });
|