Skip to content

Commit f2f0111

Browse files
committed
refactor(plugin): ✨ update parameter names for clarity in createPluginVitNode and createPluginPackageJSON
1 parent a68c484 commit f2f0111

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

packages/create-vitnode-app/src/plugin/create/create-package-json.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ const writeJson = async (path: string, data: unknown) =>
1111

1212
export const createPluginPackageJSON = async ({
1313
pluginName,
14-
root,
14+
pluginPath,
1515
eslint,
1616
}: {
1717
eslint: boolean;
1818
pluginName: string;
19-
root: string;
19+
pluginPath: string;
2020
}) => {
2121
const vitnodeVersionRange = await getVitnodePackageVersion();
2222

@@ -75,5 +75,5 @@ export const createPluginPackageJSON = async ({
7575
},
7676
};
7777

78-
await writeJson(`${root}/package.json`, pluginPkg);
78+
await writeJson(`${pluginPath}/package.json`, pluginPkg);
7979
};

packages/create-vitnode-app/src/plugin/create/create-plugin-vitnode.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ export const createPluginVitNode = async ({
1616
pluginPath,
1717
pluginName,
1818
install,
19-
root,
2019
eslint,
2120
}: CreatePluginCliReturn & {
2221
eslint: boolean;
2322
pluginName: string;
2423
pluginPath: string;
25-
root: string;
2624
}) => {
2725
const packageManager = getPackageManagerFromRoot(process.cwd());
2826

@@ -67,7 +65,7 @@ export const createPluginVitNode = async ({
6765
spinner.text = "Creating package.json...";
6866
await createPluginPackageJSON({
6967
pluginName,
70-
root,
68+
pluginPath,
7169
eslint,
7270
});
7371

@@ -98,7 +96,7 @@ export const createPluginVitNode = async ({
9896
spinner.text = "Installing dependencies...";
9997
await installDependencies({
10098
packageManager,
101-
cwd: root,
99+
cwd: pluginPath,
102100
});
103101
}
104102

packages/create-vitnode-app/src/plugin/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export const createPlugin = async ({
3636
pluginName,
3737
pluginPath,
3838
eslint,
39-
root: projectPath,
4039
...options,
4140
});
4241
};

0 commit comments

Comments
 (0)