@fireberry/cli 0.4.2 → 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.
|
@@ -125,6 +125,32 @@ jobs:
|
|
|
125
125
|
git push origin --tags
|
|
126
126
|
echo "Successfully pushed commit and tags"
|
|
127
127
|
|
|
128
|
+
- name: Sync dev branch with production version
|
|
129
|
+
if: steps.detect-type.outputs.type == 'production'
|
|
130
|
+
run: |
|
|
131
|
+
PROD_VERSION=${{ steps.version-prod.outputs.version }}
|
|
132
|
+
echo "Syncing dev branch to ${PROD_VERSION}-beta.0"
|
|
133
|
+
|
|
134
|
+
# Fetch latest dev branch
|
|
135
|
+
git fetch origin dev
|
|
136
|
+
|
|
137
|
+
# Checkout dev branch
|
|
138
|
+
git checkout dev
|
|
139
|
+
git pull origin dev
|
|
140
|
+
|
|
141
|
+
# Update version to production version with -beta.0 suffix
|
|
142
|
+
npm version ${PROD_VERSION}-beta.0 --no-git-tag-version --allow-same-version
|
|
143
|
+
|
|
144
|
+
# Commit and push to dev
|
|
145
|
+
git add package.json package-lock.json
|
|
146
|
+
git commit -m "chore: sync dev to v${PROD_VERSION}-beta.0 after production release [skip ci]"
|
|
147
|
+
git push origin dev
|
|
148
|
+
|
|
149
|
+
echo "Successfully synced dev branch to ${PROD_VERSION}-beta.0"
|
|
150
|
+
|
|
151
|
+
# Switch back to main branch
|
|
152
|
+
git checkout main
|
|
153
|
+
|
|
128
154
|
- name: Publish to npm (Beta)
|
|
129
155
|
if: steps.detect-type.outputs.type == 'beta'
|
|
130
156
|
run: |
|
|
@@ -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(),
|
|
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: `${
|
|
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.2",
|
|
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(),
|
|
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: `${
|
|
258
|
+
path: `${sanitizedName}/dist`,
|
|
259
259
|
settings: componentSettings,
|
|
260
260
|
};
|
|
261
261
|
|