Skip to content

Commit a4f3d38

Browse files
committed
docs: add complete project documentation
- Comprehensive README with features and usage examples - Contributing guidelines for contributors - Changelog tracking project evolution (v1.0.0)
1 parent 59b482f commit a4f3d38

File tree

3 files changed

+643
-0
lines changed

3 files changed

+643
-0
lines changed

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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] - 2025-12-01
9+
10+
### Added
11+
12+
- **Interactive CLI** with prompts for tool selection
13+
- **Quick modes**: `--yes` (all tools) and `--default` (sensible defaults)
14+
- **Modern TypeScript config**: ESNext target, NodeNext modules with ESM
15+
- **Tool integrations**:
16+
- ESLint with flat config (modern, non-deprecated)
17+
- TypeScript ESLint v8+ (unified `typescript-eslint` package)
18+
- Prettier with latest defaults (trailingComma: "all", printWidth: 80)
19+
- Husky pre-commit hooks with lint-staged
20+
- nodemon for dev auto-reload
21+
- **Auto-generated README.md**: Adapts to selected tools with usage instructions
22+
- **Git initialization** with optional first commit
23+
- **Package manager detection**: npm, yarn, pnpm
24+
- **Comprehensive test suite**: 39 tests with Vitest (unit, integration, e2e, messages)
25+
- **Complete documentation**: README and CONTRIBUTING guides
26+
- **CI/CD workflows**: GitHub Actions for quality checks and publishing
27+
- **Dynamic version resolution**: No hardcoded dependency versions
28+
- **Centralized messages**: All user-facing messages in `src/messages.ts` for maintainability
29+
30+
### Features
31+
32+
- Project scaffolding with configurable options
33+
- Smart defaults for rapid prototyping
34+
- Auto-format and lint staged files before commits
35+
- Type-safe configuration with strict TypeScript
36+
- Cross-platform support (Windows, macOS, Linux)
37+
- Parallel file I/O for optimal performance
38+
- Silent mode for check commands (no false error logs)
39+
40+
### Developer Experience
41+
42+
- Zero configuration needed to start
43+
- Sensible defaults that just work
44+
- Clear error messages and helpful tips
45+
- Fully tested and production-ready
46+
- Modern tooling and best practices (2024-2025)
47+
48+
### Code Quality
49+
50+
- **Modular architecture**: README generation split into 6 focused functions
51+
- **Type safety**: Strict TypeScript with no implicit `any` types
52+
- **Performance optimized**: Parallel I/O operations (Promise.all)
53+
- **Clean codebase**: No dead code, all imports used
54+
- **Comprehensive testing**: Unit tests for messages, E2E workflows, edge cases
55+
56+
[1.0.0]: https://github.com/Jszigeti/launchts/releases/tag/v1.0.0

CONTRIBUTING.md

Lines changed: 283 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,283 @@
1+
# Contributing to launchts
2+
3+
Thank you for your interest in contributing!
4+
5+
## Quick Start
6+
7+
1. **Fork and clone** the repository:
8+
9+
```bash
10+
git clone https://github.com/Jszigeti/launchts.git
11+
cd launchts
12+
```
13+
14+
2. **Install dependencies:**
15+
16+
```bash
17+
npm install
18+
```
19+
20+
3. **Run tests:**
21+
22+
```bash
23+
npm test
24+
```
25+
26+
4. **Try the CLI locally:**
27+
```bash
28+
npm run dev -- my-test-project
29+
# or build and link
30+
npm run build
31+
npm link
32+
launchts my-test-project
33+
```
34+
35+
---
36+
37+
## Development Workflow
38+
39+
### Project Structure
40+
41+
```
42+
src/
43+
├── cli.ts # CLI entry point, command parsing, prompts
44+
├── generator.ts # Core project generation logic
45+
├── configs.ts # Tool configurations (ESLint, Prettier, etc.)
46+
├── messages.ts # Centralized user-facing messages
47+
└── types.ts # TypeScript type definitions
48+
49+
tests/
50+
├── cli.integration.test.ts # CLI integration tests
51+
├── flags.test.ts # Flag parsing tests
52+
├── generator.test.ts # Generator unit tests
53+
├── generator.error.test.ts # Error handling tests
54+
├── options.test.ts # Tool injection tests
55+
└── validation.test.ts # Input validation tests
56+
```
57+
58+
### Available Scripts
59+
60+
| Command | Description |
61+
| ------------------- | ----------------------------- |
62+
| `npm run build` | Compile TypeScript to `dist/` |
63+
| `npm run dev` | Run CLI directly with ts-node |
64+
| `npm test` | Run tests in watch mode |
65+
| `npm test -- --run` | Run tests once (CI mode) |
66+
| `npm run lint` | Check for linting errors |
67+
| `npm run format` | Format code with Prettier |
68+
69+
---
70+
71+
## Testing Guidelines
72+
73+
### Writing Tests
74+
75+
All new features **must** include tests. We use [Vitest](https://vitest.dev/) for testing.
76+
77+
**Test categories:**
78+
79+
- **Unit tests** — Test individual functions in isolation
80+
- **Integration tests** — Test CLI flows end-to-end
81+
- **Error tests** — Verify error handling and edge cases
82+
83+
**Example test:**
84+
85+
```typescript
86+
import { describe, it, expect } from 'vitest';
87+
import { createProject } from '../src/generator';
88+
89+
describe('myFeature', () => {
90+
it('should do something specific', async () => {
91+
// Arrange
92+
const options = { name: 'test-project' };
93+
94+
// Act
95+
await createProject(options);
96+
97+
// Assert
98+
expect(result).toBe(expected);
99+
});
100+
});
101+
```
102+
103+
### Running Tests
104+
105+
```bash
106+
# Watch mode (default)
107+
npm test
108+
109+
# Run once (CI)
110+
npm test -- --run
111+
112+
# Run specific test file
113+
npm test -- generator.test.ts
114+
115+
# Run with coverage
116+
npm test -- --coverage
117+
```
118+
119+
---
120+
121+
## Code Style
122+
123+
We use **ESLint** and **Prettier** to maintain consistent code style.
124+
125+
### Before Committing
126+
127+
Run these commands to ensure your code passes CI:
128+
129+
```bash
130+
npm run lint # Check for linting errors
131+
npm run format # Auto-format code
132+
npm test -- --run # Run all tests
133+
```
134+
135+
### Pre-commit Hooks
136+
137+
If you have Husky installed, these checks run automatically on commit. If not:
138+
139+
```bash
140+
npm run prepare # Install Git hooks
141+
```
142+
143+
### Style Guidelines
144+
145+
- **TypeScript:** Strict mode enabled, no `any` types
146+
- **Imports:** Use absolute paths from `src/`
147+
- **Functions:** Prefer named exports
148+
- **Comments:** Use JSDoc for public APIs
149+
- **Errors:** Use descriptive error messages with actionable tips
150+
151+
---
152+
153+
## Contribution Ideas
154+
155+
### Good First Issues
156+
157+
Look for issues labeled [`good first issue`](https://github.com/Jszigeti/launchts/labels/good%20first%20issue) — these are great for newcomers!
158+
159+
### Areas to Improve
160+
161+
- **New tools:** Add support for more dev tools (Jest, Vitest, etc.)
162+
- **Templates:** Add project templates (Express, CLI, library)
163+
- **Config options:** Expose more customization options
164+
- **Documentation:** Improve examples, add tutorials
165+
- **Performance:** Optimize file I/O, parallel operations
166+
- **Error messages:** Better error handling with helpful tips
167+
168+
---
169+
170+
## Pull Request Process
171+
172+
1. **Create a branch:**
173+
174+
```bash
175+
git checkout -b feature/my-awesome-feature
176+
```
177+
178+
2. **Make your changes:**
179+
180+
- Write code
181+
- Add/update tests
182+
- Update documentation if needed
183+
184+
3. **Verify everything works:**
185+
186+
```bash
187+
npm run lint
188+
npm run format
189+
npm test -- --run
190+
npm run build
191+
```
192+
193+
4. **Commit with a clear message:**
194+
195+
```bash
196+
git commit -m "feat: add support for Jest"
197+
```
198+
199+
Use [conventional commits](https://www.conventionalcommits.org/):
200+
201+
- `feat:` New feature
202+
- `fix:` Bug fix
203+
- `docs:` Documentation changes
204+
- `test:` Test changes
205+
- `refactor:` Code refactoring
206+
- `chore:` Maintenance tasks
207+
208+
5. **Push and create PR:**
209+
210+
```bash
211+
git push origin feature/my-awesome-feature
212+
```
213+
214+
Then open a Pull Request on GitHub with:
215+
216+
- Clear description of changes
217+
- Link to related issues
218+
- Screenshots/examples if applicable
219+
220+
6. **Respond to feedback:**
221+
- Address review comments
222+
- Keep the PR focused and small
223+
224+
---
225+
226+
## Reporting Bugs
227+
228+
Found a bug? [Open an issue](https://github.com/Jszigeti/launchts/issues/new) with:
229+
230+
- **Title:** Clear, descriptive summary
231+
- **Description:** What happened vs. what you expected
232+
- **Steps to reproduce:** Minimal example to trigger the bug
233+
- **Environment:** Node version, OS, package manager
234+
- **Logs:** Any error messages or stack traces
235+
236+
**Example:**
237+
238+
```markdown
239+
**Bug:** ESLint config not created when using --eslint
240+
241+
**Steps:**
242+
243+
1. Run `npx launchts my-app --eslint`
244+
2. Check for `.eslintrc.json`
245+
246+
**Expected:** `.eslintrc.json` should exist
247+
**Actual:** File is missing
248+
249+
**Environment:**
250+
251+
- Node: v20.10.0
252+
- npm: 10.2.3
253+
- OS: macOS 14.1
254+
```
255+
256+
---
257+
258+
## Feature Requests
259+
260+
Have an idea? [Open a discussion](https://github.com/Jszigeti/launchts/discussions/new) or issue with:
261+
262+
- **Use case:** What problem does it solve?
263+
- **Proposed solution:** How should it work?
264+
- **Alternatives:** Other approaches you considered
265+
- **Examples:** Similar features in other tools
266+
267+
---
268+
269+
## Code of Conduct
270+
271+
Be respectful, inclusive, and constructive. We're all here to build something great together!
272+
273+
---
274+
275+
## Recognition
276+
277+
Contributors are recognized in:
278+
279+
- Release notes
280+
- GitHub contributors page
281+
- Special shoutouts for significant contributions
282+
283+
Thank you for making `launchts` better! ❤️

0 commit comments

Comments
 (0)