Skip to content

Commit 5dad59b

Browse files
authored
Merge pull request #93 from bertdeblock/fix-generating-paths
Fix generating paths
2 parents 0edcd17 + 351065c commit 5dad59b

File tree

3 files changed

+1761
-1750
lines changed

3 files changed

+1761
-1750
lines changed

src/generators/generator.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Clipboard } from "@napi-rs/clipboard";
2-
import { camelCase, pascalCase, pathCase } from "change-case";
2+
import { camelCase, kebabCase, pascalCase } from "change-case";
33
import { outputFile, pathExists, remove } from "fs-extra/esm";
44
import Handlebars from "handlebars";
55
import { readFile } from "node:fs/promises";
@@ -404,6 +404,13 @@ function getSrcDir(packageJson: EmberPackageJson): string {
404404
: "app";
405405
}
406406

407+
function pathCase(entityName: string): string {
408+
return entityName
409+
.split("/")
410+
.map((part) => kebabCase(part))
411+
.join("/");
412+
}
413+
407414
function resolveArgs(
408415
config: Config,
409416
generatorName: string,

0 commit comments

Comments
 (0)