Skip to content

Commit a268380

Browse files
Apply suggestions from code review
Co-authored-by: Victor Berchet <victor@suumit.com>
1 parent f27b04b commit a268380

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/cloudflare/src/cli/build/utils/create-config-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { createWranglerConfigFile, getWranglerConfigPath } from "../../utils/wra
1212
* @param projectOpts The options for the project
1313
*/
1414
export async function createWranglerConfigIfNonExistent(projectOpts: ProjectOptions): Promise<void> {
15-
const wranglerConfigFileExists = !!getWranglerConfigPath(projectOpts.sourceDir);
15+
const wranglerConfigFileExists = Boolean(getWranglerConfigPath(projectOpts.sourceDir));
1616
if (wranglerConfigFileExists) {
1717
return;
1818
}

packages/cloudflare/src/cli/commands/migrate.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ async function migrateCommand(): Promise<void> {
7777
(gitIgnoreContent) => !gitIgnoreContent.includes("NEXTJS_ENV=")
7878
);
7979

80-
if (!fs.existsSync(".dev.vars")) {
81-
printStepTitle("Creating .dev.vars");
82-
fs.writeFileSync(".dev.vars", "NEXTJS_ENV=development\n");
83-
}
8480

8581
printStepTitle(`${fs.existsSync("public/_headers") ? "Updating" : "Creating"} public/_headers file`);
8682
createOrAppendToFile(
@@ -112,8 +108,8 @@ async function migrateCommand(): Promise<void> {
112108
}
113109

114110
packageJson.scripts = {
115-
...packageJson.scripts,
116111
build: "next build",
112+
...packageJson.scripts,
117113
...openNextScripts,
118114
};
119115

0 commit comments

Comments
 (0)