Contributing
Contributing
Thank you for considering a contribution to TSone.
Development Environment
Clone the Repository
git clone https://github.com/geektech/tsone.git
cd tsoneInstall Dependencies
bun installRun the Development Server
bun run devDevelopment playgrounds live in the root playground/ directory. The official site home page and admin dashboard are managed by separate package.json files. The repository publishes the framework from packages/tsone/ and the development CLI from packages/tsone-cli/.
Build the Project
bun run buildRun Linting
bun run lintPackage Boundaries
- @geektech/tsone is the browser framework and must keep zero external runtime dependencies
- @geektech/tsone-cli owns defineConfig, resolveConfig, startDevServer, build, createProject, tsone create, tsone dev, and tsone build
- Do not add a @geektech/tsone ./dev export; applications install @geektech/tsone-cli separately
- The development server serves HTTP only. Proxy targets may use HTTP or HTTPS.
- The config file supports only a plain-object default export; functional or function-valued config is not supported.
- CLI v1 has no config plugins, WebSocket, HMR, SSR, functional config, public/ copying, or public minify/sourcemap settings
Coding Standards
TypeScript
- Use TypeScript for development
- Follow the project's TypeScript configuration
- Keep type definitions complete
Code Style
- Follow the project's ESLint configuration
- Format code with Prettier
- Keep the code style consistent
Naming Conventions
- Use PascalCase for class names
- Use camelCase for function and variable names
- Use UPPER_SNAKE_CASE for constants
- Use kebab-case for file and directory names
Commit Conventions
Commit Message Format
The project follows Conventional Commits.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]Types
- feat: a new feature
- fix: a bug fix
- docs: documentation changes
- style: code style changes
- refactor: code refactoring
- test: test changes
- chore: build process or auxiliary tool changes
Examples
feat(router): improve routing capabilities
fix(core): fix a memory leak in the reactivity system
docs: update the Component API documentationDevelopment Workflow
1. Create a Branch
git checkout -b feature/your-feature-name2. Develop the Feature
- Implement the feature
- Write tests
- Make sure the code passes linting
3. Commit Your Changes
git add .
git commit -m "feat: describe your feature"4. Push the Branch
git push origin feature/your-feature-name5. Create a Pull Request
- Open the GitHub repository
- Click New Pull Request
- Select your branch and provide a description
Testing
Write Tests
bun test
bun test packages/tsone-cli/tests
bunx tsc --noEmit
bun run build
bun pm pack --cwd packages/tsone --dry-run
bun pm pack --cwd packages/tsone-cli --dry-runTest Coverage
Aim for high test coverage to maintain code quality.
Documentation
Update Documentation
- Update API documentation
- Update guides
- Update example code
Documentation Commands
bun run docs
bun run docs:buildDocumentation Maintenance
Chinese content lives in packages/tsone/docs/app/content/zh/, while English content lives in packages/tsone/docs/app/content/en/. Both use the typed content registry and structured block helpers, and every page must have the same logical route in both directories. Chinese and English catalogs each contain exactly 17 logical routes; add or remove a route in both catalogs in the same change.
- Keep content links locale-neutral and never write /en/ manually
- Chinese public routes are unprefixed; English routes use /en/
- Browser-language detection runs only at /; manual selection takes precedence and persists
- bun run docs:build fails strictly for missing, extra, duplicate, empty, or mixed-language pages
- To host under a sub-path, build with bun run docs:build -- --base=/tsone/ or the DOCS_BASE_PATH environment variable
Issue Reports
Bug Reports
- A description of the issue
- Steps to reproduce it
- Expected and actual behavior
- Environment details and possible solutions
Feature Requests
- A description of the feature
- Why the feature is needed
- Possible implementation approaches
Code of Conduct
- Treat others with respect
- Accept constructive criticism
- Focus on the community's best interests
- Be kind and patient
Communication Channels
- GitHub Issues: bug reports and feature requests
- GitHub Discussions: discussions and questions
License
By contributing code, you agree that your contribution will be released under the MIT License.
Thank You
Thank you again for contributing. Your participation helps make TSone better.