Skip to content

Commit

Permalink
fix: minor refactor of filename in properties-to-ts
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGhadyani-Okta committed Feb 15, 2024
1 parent 906c43d commit 4061c0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/odyssey-react-mui/scripts/properties-to-ts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import yargs from "yargs/yargs";

const convert = (baseFiles: string[], propertiesTargetDir: string) => {
baseFiles.forEach((src) => {
const filename = basename(src);
const extension = extname(src);
const filename = basename(src, extension);
const source = `${readFileSync(src)}`;

properties.parse(source, function (error, propertiesJson) {
Expand All @@ -40,7 +40,7 @@ const convert = (baseFiles: string[], propertiesTargetDir: string) => {

const targetFile = join(
propertiesTargetDir,
filename.replace(extension, ".ts")
filename.concat(".ts")
);

writeFileSync(
Expand Down

0 comments on commit 4061c0d

Please sign in to comment.