Skip to content

Commit

Permalink
feat!: stop passing isTypeScript to remix.init script (#7099)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Aug 10, 2023
1 parent 6a797f7 commit b1149bb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/kind-grapes-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"create-remix": major
"@remix-run/dev": major
---

Stop passing `isTypeScript` to `remix.init` script
3 changes: 1 addition & 2 deletions packages/create-remix/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ async function runInitScriptStep(ctx: Context) {

let initScriptDir = path.dirname(ctx.initScriptPath);
let initPackageJson = path.resolve(initScriptDir, "package.json");
let isTypeScript = fs.existsSync(path.join(ctx.cwd, "tsconfig.json"));
let packageManager = ctx.pkgManager;

try {
Expand Down Expand Up @@ -525,7 +524,7 @@ async function runInitScriptStep(ctx: Context) {
throw new Error("remix.init script doesn't export a function.");
}
let rootDirectory = path.resolve(ctx.cwd);
await initFn({ isTypeScript, packageManager, rootDirectory });
await initFn({ packageManager, rootDirectory });
} catch (err) {
error("Oh no!", "Template's remix.init script failed");
throw err;
Expand Down
3 changes: 1 addition & 2 deletions packages/remix-dev/cli/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export async function init(
}

let initPackageJson = path.resolve(initScriptDir, "package.json");
let isTypeScript = fse.existsSync(path.join(projectDir, "tsconfig.json"));
let packageManager = detectPackageManager() ?? "npm";

if (await fse.pathExists(initPackageJson)) {
Expand All @@ -51,7 +50,7 @@ export async function init(
initFn = initFn.default;
}
try {
await initFn({ isTypeScript, packageManager, rootDirectory: projectDir });
await initFn({ packageManager, rootDirectory: projectDir });

if (deleteScript) {
await fse.remove(initScriptDir);
Expand Down

0 comments on commit b1149bb

Please sign in to comment.