This file provides guidance to coding agents when working with code in this repository.
This is a monorepo using pnpm workspaces with multiple packages:
packages/bod/- Main CLI tool for creating React projectspackages/eslint-config/- ESLint configuration packagespackages/stylelint-config/- StyleLint configuration packagespackages/webpack-template/- Webpack-based React templatewebsite/- Documentation site
The project follows a monorepo structure where each package is independently versionable and publishable to npm.
# Install dependencies
pnpm install
# Run all tests across packages
pnpm test:all
# Build all packages
pnpm build
# Lint all packages
pnpm lint
# Fix linting issues
pnpm lint:fix
# Format all code
pnpm format
# Start development servers
pnpm start # Start root level development
pnpm --filter @dg-scripts/webpack-template start # Start webpack template dev server
pnpm start:all # Start all packages
pnpm start:bod # Start bod CLI in dev mode
# Build documentation
pnpm build:docs# Work on specific package
pnpm --filter <package-name> <command>
# Examples:
pnpm --filter bod start # Run bod CLI in development
pnpm --filter @dg-scripts/webpack-template dev # Start webpack template dev server
pnpm --filter @dg-scripts/eslint-config lint # Lint ESLint config# Run root-level tests
jest --watch
# Run tests for specific package
pnpm --filter bod test
# Run tests with coverage
pnpm test:all && pnpm badge- Package Manager: pnpm with workspaces
- CLI Framework: Commander.js with Inquirer prompts
- Build Tool: Webpack with TypeScript support
- Testing: Jest with ts-jest
- Linting: ESLint 9.x with TypeScript support, StyleLint for CSS
- Documentation: Custom documentation build system
src/bod.ts- Main CLI entry pointsrc/commands/- Command implementations (CreateCommand, InfoCommand)src/utils/- Utility functions for console output, OS detection, core operations
- Modern webpack 5 configuration with TypeScript
- Development server with hot reloading
- Production optimization with CSS/JS minification
- Particle system demonstration code included
- Based on
@antfu/eslint-config - Type-aware linting with TypeScript support
The project uses automated releases with:
- Version bumps via
tsx scripts/release.ts - Lerna for publishing multi-package releases
- GitHub Actions for CI/CD and npm publishing
- Automatic changelog generation
- Unit tests for CLI commands and utilities
- E2E tests for full project creation workflow
- Coverage reporting via Codecov
- Automated badge generation for coverage display
- Use
pnpm installto install dependencies - Run
pnpm lintandpnpm testbefore committing - Use workspace filtering to work on specific packages
- Most packages follow the same script structure: lint, build, test, dev/start