···11+# Contributing to TypeLex
22+33+Thank you for your interest in contributing to TypeLex!
44+55+## Development Setup
66+77+1. Fork and clone the repository
88+2. Install dependencies:
99+ ```bash
1010+ npm install
1111+ ```
1212+1313+3. Build the emitter:
1414+ ```bash
1515+ cd typelex-emitter
1616+ npm run build
1717+ npm link
1818+ ```
1919+2020+4. Test your changes:
2121+ ```bash
2222+ cd ../typelex-example
2323+ npm link @typelex/emitter
2424+ npm run build
2525+ ```
2626+2727+## Project Structure
2828+2929+- `typelex-emitter/` - The TypeSpec emitter implementation
3030+ - `src/` - Source code
3131+ - `test/` - Tests (needs work!)
3232+- `typelex-example/` - Example usage of TypeLex
3333+3434+## Making Changes
3535+3636+1. Create a feature branch
3737+2. Make your changes
3838+3. Test with the example project
3939+4. Submit a pull request
4040+4141+## Areas for Contribution
4242+4343+- [ ] Add support for XRPC queries and procedures
4444+- [ ] Add support for subscriptions
4545+- [ ] Implement union types
4646+- [ ] Add ATProto-specific decorators (@maxGraphemes, etc.)
4747+- [ ] Improve test coverage
4848+- [ ] Add more examples
4949+- [ ] Documentation improvements
5050+5151+## Code Style
5252+5353+- Use TypeScript
5454+- Follow existing patterns in the codebase
5555+- Add comments for complex logic
5656+- Update tests when adding features
5757+5858+## Questions?
5959+6060+Feel free to open an issue for discussion!
···77}
8899export async function $onEmit(context: EmitContext<TypeLexEmitterOptions>) {
1010- const outputDir = context.options["output-dir"] ?? "./lexicons";
1111- const resolvedOutputDir = context.emitterOutputDir
1212- ? resolvePath(context.emitterOutputDir, outputDir)
1313- : resolvePath(outputDir);
1010+ // If user specified output-dir in options, use that directly
1111+ // Otherwise use TypeSpec's default emitterOutputDir
1212+ const outputDir = context.options["output-dir"]
1313+ ? resolvePath(context.options["output-dir"])
1414+ : context.emitterOutputDir;
14151516 const emitter = new TypeLexEmitter(context.program, {
1616- outputDir: resolvedOutputDir,
1717+ outputDir: outputDir,
1718 });
18191920 await emitter.emit();
+14-1
typelex-example/.gitignore
···11+# Dependencies
12node_modules/
33+44+# Generated lexicons
55+lexicons/
66+77+# TypeSpec output (if using default config)
28tsp-output/
33-.DS_Store99+generated/
1010+1111+# OS
1212+.DS_Store
1313+1414+# IDE
1515+.vscode/
1616+.idea/
+1-1
typelex-example/README.md
···2222npm run build
2323```
24242525-The generated lexicons will be in `tsp-output/@typelex/emitter/lexicons/`.
2525+The generated lexicons will be in `lexicons/`.
26262727## Project Structure
2828