@fireberry/cli 0.4.3-beta.1 → 0.4.3-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -130,7 +130,7 @@ export async function runCreateComponent({ type, name, }) {
130
130
  const componentSettings = await promptForSettings(validatedType);
131
131
  spinner.text = chalk.cyan(`Creating Vite React app for "${chalk.cyan(componentName)}"...`);
132
132
  spinner.start();
133
- const componentDir = path.join(process.cwd(), componentName);
133
+ const componentDir = path.join(process.cwd(), sanitizedName);
134
134
  await fs.ensureDir(componentDir);
135
135
  spinner.text = `Running npm create vite@latest...`;
136
136
  const viteResult = spawnSync(`npm create vite@latest ${sanitizedName} -- --template react --no-interactive`, {
@@ -183,7 +183,7 @@ export async function runCreateComponent({ type, name, }) {
183
183
  type: validatedType,
184
184
  title: componentName,
185
185
  id: componentId,
186
- path: `${componentName}/dist`,
186
+ path: `${sanitizedName}/dist`,
187
187
  settings: componentSettings,
188
188
  };
189
189
  if (!manifest.components) {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@fireberry/cli",
3
- "version": "0.4.3-beta.1",
3
+ "version": "0.4.3-beta.2",
4
4
  "description": "Fireberry CLI tool",
5
5
  "type": "module",
6
6
  "author": "",
7
7
  "license": "MIT",
8
+ "preferGlobal": true,
8
9
  "bin": {
9
10
  "fireberry": "dist/bin/fireberry.js"
10
11
  },
@@ -175,7 +175,7 @@ export async function runCreateComponent({
175
175
  );
176
176
  spinner.start();
177
177
 
178
- const componentDir = path.join(process.cwd(), componentName);
178
+ const componentDir = path.join(process.cwd(), sanitizedName);
179
179
  await fs.ensureDir(componentDir);
180
180
 
181
181
  spinner.text = `Running npm create vite@latest...`;
@@ -255,7 +255,7 @@ export async function runCreateComponent({
255
255
  type: validatedType,
256
256
  title: componentName,
257
257
  id: componentId,
258
- path: `${componentName}/dist`,
258
+ path: `${sanitizedName}/dist`,
259
259
  settings: componentSettings,
260
260
  };
261
261