Skip to content

Commit

Permalink
fix(glob): change import method from default export to named export (#24
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Nishimura Wataru authored Mar 21, 2024
1 parent 7d263a1 commit d7a5ecd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { print } from "./print";
import { CLIOptions } from "./cli";
import { createSource as createModelSource } from "./models/createSource";
import { createRouteParamsSource } from "./routes/createSource";
import glob from "glob";
import { sync } from "glob";
import fs from "fs";
import { execSync } from "child_process";
import { LaravelModelType, LaravelRouteListType } from "./types";
Expand All @@ -25,12 +25,12 @@ export async function generate(options: CLIOptions) {
const parsedModelPath = path
.join(options.modelPath, "**", "*.php")
.replace(/\\/g, "/");
const models = glob.sync(parsedModelPath);
const models = sync(parsedModelPath);
const modelData: LaravelModelType[] = [];
const parsedEnumPath = path
.join(options.enumPath, "**", "*.php")
.replace(/\\/g, "/");
const enums = glob.sync(parsedEnumPath);
const enums = sync(parsedEnumPath);
if (!fs.existsSync(tmpDir)) {
fs.mkdirSync(tmpDir);
}
Expand Down

0 comments on commit d7a5ecd

Please sign in to comment.