Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug #15

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions commands/setup_theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ async function setup_theme(themeName) {
zip.extractAllTo('theme-redone', true); // Extract to current directory
spinner.succeed('Unzipping completed');

// Delete the .git directory from the new theme folder
const gitDirPath = path.join(newThemePath, '.git');
if (fs.existsSync(gitDirPath)) {
fs.rmSync(gitDirPath, { recursive: true, force: true });
}

// Rename the extracted folder
// Note: You need to adjust the logic here to determine the correct extracted folder name
spinner.start('Renaming the folder...');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webredone/trb-cli",
"version": "3.0.5",
"version": "3.0.6",
"description": "TRB-CLI is a handy Node.js CLI that automates the process of managing blocks in a Theme Redone WordPress theme",
"main": "index.js",
"type": "module",
Expand Down
Loading