fix(format): Improve concurrency control in cache and rollback modules, refine gitignore custom section handling, and enhance Prettier file processing
This commit is contained in:
33
readme.md
33
readme.md
@@ -47,12 +47,14 @@ gitzone template [template-name]
|
||||
```
|
||||
|
||||
**Available templates:**
|
||||
|
||||
- **`npm`** - TypeScript npm package with testing, CI/CD, and full tooling
|
||||
- **`service`** - Microservice architecture with Docker support
|
||||
- **`website`** - Modern web application with LitElement and service workers
|
||||
- **`website`** - Modern web application with LitElement and service workers
|
||||
- **`wcc`** - Web Component Collection for reusable UI components
|
||||
|
||||
Each template comes pre-configured with:
|
||||
|
||||
- ✅ TypeScript with modern configurations
|
||||
- ✅ Automated testing setup
|
||||
- ✅ CI/CD pipelines (GitLab/GitHub)
|
||||
@@ -81,6 +83,7 @@ gitzone format --verbose
|
||||
```
|
||||
|
||||
**Format features:**
|
||||
|
||||
- 🔄 **Smart caching** - Only processes changed files
|
||||
- 🛡️ **Rollback support** - Undo formatting changes if needed
|
||||
- 📊 **Detailed reporting** - See exactly what changed
|
||||
@@ -88,6 +91,7 @@ gitzone format --verbose
|
||||
- 🎯 **Module-specific formatting** - Target specific formatters
|
||||
|
||||
**Rollback capabilities:**
|
||||
|
||||
```bash
|
||||
# List all available backups
|
||||
gitzone format --list-backups
|
||||
@@ -103,6 +107,7 @@ gitzone format --clean-backups
|
||||
```
|
||||
|
||||
**Formatters included:**
|
||||
|
||||
- **Prettier** - JavaScript/TypeScript code formatting
|
||||
- **License** - Ensure proper licensing
|
||||
- **Package.json** - Standardize package configurations
|
||||
@@ -121,6 +126,7 @@ gitzone commit
|
||||
```
|
||||
|
||||
Features:
|
||||
|
||||
- 📝 Interactive commit message builder
|
||||
- 🏷️ Automatic version bumping (major/minor/patch)
|
||||
- 📜 Changelog generation
|
||||
@@ -128,6 +134,7 @@ Features:
|
||||
- 🎯 Conventional commit compliance
|
||||
|
||||
The commit wizard guides you through:
|
||||
|
||||
1. **Type selection** (feat/fix/docs/style/refactor/perf/test/chore)
|
||||
2. **Scope definition** (component/module affected)
|
||||
3. **Description crafting**
|
||||
@@ -153,6 +160,7 @@ gitzone meta remove [name]
|
||||
```
|
||||
|
||||
Perfect for:
|
||||
|
||||
- Monorepo management
|
||||
- Multi-package projects
|
||||
- Coordinated deployments
|
||||
@@ -168,6 +176,7 @@ gitzone docker prune
|
||||
```
|
||||
|
||||
This command removes:
|
||||
|
||||
- Stopped containers
|
||||
- Unused images
|
||||
- Dangling volumes
|
||||
@@ -196,6 +205,7 @@ gitzone deprecate
|
||||
```
|
||||
|
||||
Interactive wizard for:
|
||||
|
||||
- Setting deprecation notices
|
||||
- Guiding users to replacements
|
||||
- Updating registry metadata
|
||||
@@ -210,6 +220,7 @@ gitzone start
|
||||
```
|
||||
|
||||
Automatically:
|
||||
|
||||
- Checks out master branch
|
||||
- Pulls latest changes
|
||||
- Installs dependencies
|
||||
@@ -266,18 +277,21 @@ Customize gitzone behavior through `npmextra.json`:
|
||||
## 🏆 Best Practices
|
||||
|
||||
### For New Projects
|
||||
|
||||
1. Start with a template: `gitzone template npm`
|
||||
2. Customize the generated structure
|
||||
3. Run initial format: `gitzone format`
|
||||
4. Set up CI/CD: `gitzone open ci`
|
||||
|
||||
### For Existing Projects
|
||||
|
||||
1. Initialize: `gitzone start`
|
||||
2. Format codebase: `gitzone format --dry-run` (preview first!)
|
||||
3. Apply formatting: `gitzone format --yes`
|
||||
4. Commit changes: `gitzone commit`
|
||||
|
||||
### For Teams
|
||||
|
||||
1. Document format preferences in `npmextra.json`
|
||||
2. Use `--save-plan` for reviewable format changes
|
||||
3. Enable rollback for safety
|
||||
@@ -286,6 +300,7 @@ Customize gitzone behavior through `npmextra.json`:
|
||||
## 🎯 Common Workflows
|
||||
|
||||
### Clean Development Cycle
|
||||
|
||||
```bash
|
||||
# 1. Start fresh
|
||||
gitzone start
|
||||
@@ -304,6 +319,7 @@ gitzone commit
|
||||
```
|
||||
|
||||
### Multi-Repository Management
|
||||
|
||||
```bash
|
||||
# 1. Set up meta repository
|
||||
gitzone meta init
|
||||
@@ -318,6 +334,7 @@ gitzone meta update
|
||||
```
|
||||
|
||||
### Safe Formatting with Rollback
|
||||
|
||||
```bash
|
||||
# 1. Preview changes
|
||||
gitzone format --dry-run
|
||||
@@ -335,17 +352,20 @@ gitzone format --rollback
|
||||
## 🔌 Integrations
|
||||
|
||||
### CI/CD Platforms
|
||||
|
||||
- **GitLab CI** - Full pipeline support with templates
|
||||
- **GitHub Actions** - Automated workflows
|
||||
- **Docker** - Container-based deployments
|
||||
|
||||
### Development Tools
|
||||
|
||||
- **TypeScript** - First-class support
|
||||
- **Prettier** - Code formatting
|
||||
- **ESLint** - Linting (via format modules)
|
||||
- **npm/pnpm** - Package management
|
||||
|
||||
### Version Control
|
||||
|
||||
- **Git** - Deep integration
|
||||
- **Semantic Versioning** - Automatic version bumping
|
||||
- **Conventional Commits** - Standardized commit messages
|
||||
@@ -361,19 +381,25 @@ gitzone format --rollback
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Format Command Shows "Cancelled"
|
||||
|
||||
If the format command shows cancelled even after confirming:
|
||||
|
||||
- Check your `npmextra.json` configuration
|
||||
- Try with `--yes` flag to skip confirmation
|
||||
- Use `--verbose` for detailed output
|
||||
|
||||
### Docker Commands Fail
|
||||
|
||||
Ensure Docker daemon is running:
|
||||
|
||||
```bash
|
||||
docker info
|
||||
```
|
||||
|
||||
### Template Creation Issues
|
||||
|
||||
Verify npm/pnpm is properly configured:
|
||||
|
||||
```bash
|
||||
npm config get registry
|
||||
```
|
||||
@@ -381,6 +407,7 @@ npm config get registry
|
||||
## 📈 Performance
|
||||
|
||||
gitzone is optimized for speed:
|
||||
|
||||
- **Parallel processing** for format operations
|
||||
- **Smart caching** to avoid redundant work
|
||||
- **Incremental updates** for meta repositories
|
||||
@@ -388,7 +415,7 @@ gitzone is optimized for speed:
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||
|
||||
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||
|
||||
@@ -403,4 +430,4 @@ Registered at District court Bremen HRB 35230 HB, Germany
|
||||
|
||||
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
||||
|
||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||
|
Reference in New Issue
Block a user