@jatinmourya/ng-init 1.0.0
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.
- package/CHANGELOG.md +129 -0
- package/CONTRIBUTING.md +210 -0
- package/IMPLEMENTATION_SUMMARY.md +411 -0
- package/INSTALLATION.md +375 -0
- package/LICENSE +21 -0
- package/PROJECT_DOCUMENTATION.md +384 -0
- package/QUICK_START.md +252 -0
- package/README.md +300 -0
- package/package.json +56 -0
- package/src/index.js +152 -0
- package/src/runner.js +574 -0
- package/src/templates/templates.js +403 -0
- package/src/utils/compatibility.js +333 -0
- package/src/utils/file-utils.js +232 -0
- package/src/utils/installer.js +247 -0
- package/src/utils/npm-search.js +354 -0
- package/src/utils/profile-manager.js +219 -0
- package/src/utils/prompt-handler.js +393 -0
- package/src/utils/version-checker.js +169 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2026-01-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
#### Core Features
|
|
13
|
+
- System environment check displaying Node.js, npm, nvm, and Angular CLI versions
|
|
14
|
+
- Interactive Angular version selection from npm registry
|
|
15
|
+
- Node.js compatibility checking with selected Angular version
|
|
16
|
+
- Smart Node version management with nvm support
|
|
17
|
+
- Node.js installation assistant for systems without nvm
|
|
18
|
+
- Project location configuration (current or custom directory)
|
|
19
|
+
- Complete project initialization with Angular CLI
|
|
20
|
+
|
|
21
|
+
#### Advanced Features
|
|
22
|
+
- Pre-configured project templates (Basic, Enterprise, PWA, Material, Testing, Standalone)
|
|
23
|
+
- Interactive library search with npm registry autocomplete
|
|
24
|
+
- Real-time package validation and metadata display
|
|
25
|
+
- Popular library bundles (UI Framework, State Management, Forms, Testing, etc.)
|
|
26
|
+
- Configuration presets (TypeScript strict mode, ESLint, Prettier, Husky)
|
|
27
|
+
- Automatic project structure generation (core, shared, features folders)
|
|
28
|
+
- Git repository initialization with .gitignore
|
|
29
|
+
- Documentation generation (README.md, CHANGELOG.md)
|
|
30
|
+
- Profile management system (save, load, export, import configurations)
|
|
31
|
+
|
|
32
|
+
#### CLI Commands
|
|
33
|
+
- `ng-init` - Main interactive project creation
|
|
34
|
+
- `ng-init create` - Alias for main command
|
|
35
|
+
- `ng-init check` - System version check
|
|
36
|
+
- `ng-init profile list` - List saved profiles
|
|
37
|
+
- `ng-init profile show <name>` - Show profile details
|
|
38
|
+
- `ng-init profile delete <name>` - Delete a profile
|
|
39
|
+
- `ng-init profile export <name> <output>` - Export profile to file
|
|
40
|
+
- `ng-init profile import <file>` - Import profile from file
|
|
41
|
+
- `ng-init examples` - Show usage examples
|
|
42
|
+
|
|
43
|
+
#### Utility Modules
|
|
44
|
+
- Version checker for system components
|
|
45
|
+
- npm registry search and validation
|
|
46
|
+
- Compatibility checking and resolution
|
|
47
|
+
- Package installation management
|
|
48
|
+
- Interactive prompt handlers
|
|
49
|
+
- File operations and utilities
|
|
50
|
+
- Profile management system
|
|
51
|
+
|
|
52
|
+
#### Templates & Bundles
|
|
53
|
+
- 6 pre-configured project templates
|
|
54
|
+
- 8 popular library bundles
|
|
55
|
+
- 3 configuration presets
|
|
56
|
+
- Standard and domain-driven project structures
|
|
57
|
+
- Git configuration templates
|
|
58
|
+
- Documentation templates
|
|
59
|
+
|
|
60
|
+
### Technical Details
|
|
61
|
+
|
|
62
|
+
#### Dependencies
|
|
63
|
+
- @inquirer/prompts: ^7.10.1
|
|
64
|
+
- axios: ^1.6.5
|
|
65
|
+
- chalk: ^5.3.0
|
|
66
|
+
- commander: ^13.1.0
|
|
67
|
+
- execa: ^9.6.1
|
|
68
|
+
- inquirer: ^9.2.12
|
|
69
|
+
- inquirer-autocomplete-prompt: ^3.0.1
|
|
70
|
+
- lodash.debounce: ^4.0.8
|
|
71
|
+
- ora: ^8.0.1
|
|
72
|
+
- semver: ^7.5.4
|
|
73
|
+
|
|
74
|
+
#### Supported Platforms
|
|
75
|
+
- Windows (with nvm-windows support)
|
|
76
|
+
- macOS (with nvm support)
|
|
77
|
+
- Linux (with nvm support)
|
|
78
|
+
|
|
79
|
+
#### Node.js Requirements
|
|
80
|
+
- Minimum: Node.js v18.0.0
|
|
81
|
+
- Recommended: Node.js v18.19.0 or v20.11.0 (LTS)
|
|
82
|
+
|
|
83
|
+
### Documentation
|
|
84
|
+
- Comprehensive README.md with usage examples
|
|
85
|
+
- Detailed PROJECT_DOCUMENTATION.md with architecture
|
|
86
|
+
- CONTRIBUTING.md with contribution guidelines
|
|
87
|
+
- LICENSE (MIT)
|
|
88
|
+
|
|
89
|
+
### Initial Release Notes
|
|
90
|
+
|
|
91
|
+
This is the initial release of Angular Project Automator, a comprehensive CLI tool designed to streamline Angular project initialization with:
|
|
92
|
+
|
|
93
|
+
- **80% reduction** in project setup time
|
|
94
|
+
- **Zero environment errors** with guided Node.js version management
|
|
95
|
+
- **Intelligent library search** with npm registry integration
|
|
96
|
+
- **Reusable profiles** for team standardization
|
|
97
|
+
- **Best practices** built-in with pre-configured templates
|
|
98
|
+
|
|
99
|
+
The tool automates the entire project setup process, from checking system prerequisites to creating a fully-configured Angular project with all necessary libraries and tooling.
|
|
100
|
+
|
|
101
|
+
### Known Limitations
|
|
102
|
+
|
|
103
|
+
- Windows: Direct Node.js installation requires winget
|
|
104
|
+
- Network required for npm registry access
|
|
105
|
+
- Some features require nvm for full functionality
|
|
106
|
+
|
|
107
|
+
### Future Plans
|
|
108
|
+
|
|
109
|
+
#### Phase 2 (Planned)
|
|
110
|
+
- Enhanced library bundles
|
|
111
|
+
- More project templates
|
|
112
|
+
- Additional configuration presets
|
|
113
|
+
- Improved documentation generation
|
|
114
|
+
|
|
115
|
+
#### Phase 3 (Planned)
|
|
116
|
+
- Advanced Git integration
|
|
117
|
+
- Enhanced profile management
|
|
118
|
+
- Migration assistant
|
|
119
|
+
- Multi-language support
|
|
120
|
+
|
|
121
|
+
#### Phase 4 (Planned)
|
|
122
|
+
- Dashboard/Analytics
|
|
123
|
+
- Update notifications
|
|
124
|
+
- Cloud sync features
|
|
125
|
+
- Team collaboration features
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
[1.0.0]: https://github.com/jatinmourya/ng-init/releases/tag/v1.0.0
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Contributing to Angular Project Automator
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to Angular Project Automator! This document provides guidelines and instructions for contributing.
|
|
4
|
+
|
|
5
|
+
## ๐ How to Contribute
|
|
6
|
+
|
|
7
|
+
### Reporting Bugs
|
|
8
|
+
|
|
9
|
+
If you find a bug, please create an issue on GitHub with the following information:
|
|
10
|
+
|
|
11
|
+
- **Description**: Clear description of the bug
|
|
12
|
+
- **Steps to Reproduce**: Step-by-step instructions
|
|
13
|
+
- **Expected Behavior**: What should happen
|
|
14
|
+
- **Actual Behavior**: What actually happens
|
|
15
|
+
- **Environment**: OS, Node.js version, npm version
|
|
16
|
+
- **Screenshots**: If applicable
|
|
17
|
+
|
|
18
|
+
### Suggesting Features
|
|
19
|
+
|
|
20
|
+
We welcome feature suggestions! Please create an issue with:
|
|
21
|
+
|
|
22
|
+
- **Feature Description**: Clear description of the feature
|
|
23
|
+
- **Use Case**: Why this feature would be useful
|
|
24
|
+
- **Proposed Implementation**: If you have ideas on how to implement it
|
|
25
|
+
- **Examples**: Similar features in other tools
|
|
26
|
+
|
|
27
|
+
### Pull Requests
|
|
28
|
+
|
|
29
|
+
1. **Fork the Repository**
|
|
30
|
+
```bash
|
|
31
|
+
git clone https://github.com/jatinmourya/ng-init.git
|
|
32
|
+
cd ng-init
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
2. **Create a Branch**
|
|
36
|
+
```bash
|
|
37
|
+
git checkout -b feature/your-feature-name
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
3. **Make Your Changes**
|
|
41
|
+
- Write clean, readable code
|
|
42
|
+
- Follow existing code style
|
|
43
|
+
- Add comments for complex logic
|
|
44
|
+
- Update documentation if needed
|
|
45
|
+
|
|
46
|
+
4. **Test Your Changes**
|
|
47
|
+
```bash
|
|
48
|
+
npm link
|
|
49
|
+
ng-init
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
5. **Commit Your Changes**
|
|
53
|
+
```bash
|
|
54
|
+
git add .
|
|
55
|
+
git commit -m "Add: feature description"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Commit message format:
|
|
59
|
+
- `Add:` for new features
|
|
60
|
+
- `Fix:` for bug fixes
|
|
61
|
+
- `Update:` for updates to existing features
|
|
62
|
+
- `Docs:` for documentation changes
|
|
63
|
+
- `Refactor:` for code refactoring
|
|
64
|
+
|
|
65
|
+
6. **Push to Your Fork**
|
|
66
|
+
```bash
|
|
67
|
+
git push origin feature/your-feature-name
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
7. **Create Pull Request**
|
|
71
|
+
- Go to the original repository
|
|
72
|
+
- Click "New Pull Request"
|
|
73
|
+
- Select your branch
|
|
74
|
+
- Fill in the PR template
|
|
75
|
+
|
|
76
|
+
## ๐ Code Style Guidelines
|
|
77
|
+
|
|
78
|
+
### JavaScript/Node.js
|
|
79
|
+
|
|
80
|
+
- Use ES6+ syntax
|
|
81
|
+
- Use `import`/`export` for modules
|
|
82
|
+
- Use `async`/`await` for asynchronous operations
|
|
83
|
+
- Use meaningful variable and function names
|
|
84
|
+
- Add JSDoc comments for functions
|
|
85
|
+
- Keep functions small and focused
|
|
86
|
+
|
|
87
|
+
### Example:
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
/**
|
|
91
|
+
* Get package details from npm registry
|
|
92
|
+
* @param {string} packageName - The name of the package
|
|
93
|
+
* @returns {Promise<Object|null>} Package details or null if not found
|
|
94
|
+
*/
|
|
95
|
+
export async function getPackageDetails(packageName) {
|
|
96
|
+
try {
|
|
97
|
+
const response = await axios.get(`${NPM_REGISTRY_URL}/${packageName}`);
|
|
98
|
+
return response.data;
|
|
99
|
+
} catch (error) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### File Organization
|
|
106
|
+
|
|
107
|
+
- Place utilities in `src/utils/`
|
|
108
|
+
- Place templates in `src/templates/`
|
|
109
|
+
- Place command handlers in `src/commands/` (if applicable)
|
|
110
|
+
- Keep related functionality together
|
|
111
|
+
|
|
112
|
+
## ๐งช Testing
|
|
113
|
+
|
|
114
|
+
Before submitting a PR:
|
|
115
|
+
|
|
116
|
+
1. Test the main flow:
|
|
117
|
+
```bash
|
|
118
|
+
ng-init
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
2. Test all commands:
|
|
122
|
+
```bash
|
|
123
|
+
ng-init check
|
|
124
|
+
ng-init profile list
|
|
125
|
+
ng-init examples
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
3. Test edge cases:
|
|
129
|
+
- Invalid inputs
|
|
130
|
+
- Network errors
|
|
131
|
+
- Missing dependencies
|
|
132
|
+
|
|
133
|
+
## ๐ Documentation
|
|
134
|
+
|
|
135
|
+
- Update README.md if you add features
|
|
136
|
+
- Update PROJECT_DOCUMENTATION.md for architectural changes
|
|
137
|
+
- Add inline comments for complex code
|
|
138
|
+
- Update examples if behavior changes
|
|
139
|
+
|
|
140
|
+
## ๐ฏ Areas We Need Help With
|
|
141
|
+
|
|
142
|
+
- **Templates**: More project templates
|
|
143
|
+
- **Bundles**: Additional library bundles
|
|
144
|
+
- **Testing**: Unit tests and integration tests
|
|
145
|
+
- **Documentation**: Better examples and guides
|
|
146
|
+
- **Platform Support**: Better support for Linux/macOS
|
|
147
|
+
- **Performance**: Optimization and caching
|
|
148
|
+
- **UI/UX**: Better interactive prompts
|
|
149
|
+
|
|
150
|
+
## ๐ Code Review Process
|
|
151
|
+
|
|
152
|
+
1. PRs will be reviewed by maintainers
|
|
153
|
+
2. Feedback will be provided as comments
|
|
154
|
+
3. Make requested changes
|
|
155
|
+
4. Once approved, PR will be merged
|
|
156
|
+
|
|
157
|
+
## ๐ Development Setup
|
|
158
|
+
|
|
159
|
+
1. **Clone the repository**
|
|
160
|
+
```bash
|
|
161
|
+
git clone https://github.com/jatinmourya/ng-init.git
|
|
162
|
+
cd ng-init
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
2. **Install dependencies**
|
|
166
|
+
```bash
|
|
167
|
+
npm install
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
3. **Link for local testing**
|
|
171
|
+
```bash
|
|
172
|
+
npm link
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
4. **Test the CLI**
|
|
176
|
+
```bash
|
|
177
|
+
ng-init
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
5. **Unlink when done**
|
|
181
|
+
```bash
|
|
182
|
+
npm unlink -g ng-init
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## ๐ Debugging
|
|
186
|
+
|
|
187
|
+
Add debug logs:
|
|
188
|
+
```javascript
|
|
189
|
+
console.log(chalk.yellow('[DEBUG]'), 'Your debug message', variable);
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Run with verbose output to see all logs.
|
|
193
|
+
|
|
194
|
+
## ๐ License
|
|
195
|
+
|
|
196
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
197
|
+
|
|
198
|
+
## ๐ฌ Questions?
|
|
199
|
+
|
|
200
|
+
- Create an issue for questions
|
|
201
|
+
- Join discussions in GitHub Discussions
|
|
202
|
+
- Contact maintainers directly for sensitive issues
|
|
203
|
+
|
|
204
|
+
## ๐ Thank You!
|
|
205
|
+
|
|
206
|
+
Your contributions make this project better for everyone. Thank you for taking the time to contribute!
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
**Happy Contributing! ๐**
|