Contributing
Inlang is setup as monorepo with turborepo and NPM workspaces.
Prerequisites
Getting started
- Open the repository in VSCode.
- Open the repository in a dev container via
CMD + Shift + P
and search forOpen in container
. Make sure to allocate enough memory in your Docker setup (4GB). npm install
to install dependenciesnpm run dev
to run the development environment.npm run test
to run the tests.npm run build
to compile a production build.
For Windows users
There is a problem with Hot Module Reloading (HMR) within the Windows file system. To fix this problem, you can use the Linux subsystem:
- Start the dev container first
- Navigate to the Linux subsystem with
cd $HOME
&cd /mnt
. - Clone the inlang repo into the Linux subsystem
- Navigate to the inlang repo
- Run
npm install
&npm run dev
Note: Make sure that the user has the right to edit files. For Docker Desktop, the user should be node
.
Debugging
- (If running, stop
npm run dev
.) - Press
F5
. - Wait until the terminal is showing "listening on localhost:3000".
- Open "localhost:xxxx" in the browser.
Contributing changes
- Fork the project on Github.
- Open the freshly cloned project with Visual Studio Code and Dev Containers.
- Create a branch for your new feature or improvement.
- Test with
npm run test
. - Debug and write tests for your changes.
- Use the preconfigured launch scripts in Visual Studio Codes
Run and Debug
view.
- Use the preconfigured launch scripts in Visual Studio Codes
- Describe your changes by running
npx changeset
and answering the questions. (learn more here) - Contribute your changes via a upstream pull request.
Workspaces
ide-extension
- Clone
https://github.com/inlang/example
intosource-code/ide-extension
for debugging withgit clone https://github.com/inlang/example source-code/ide-extension/example
and install dependenciescd source-code/ide-extension/example && npm install
. - Launch
debug ide-extension
via Visual Studio CodesRun and Debug
view to debug the extension with it's example project, after you run the development environment withnpm run dev
. - Launch
debug ide-exension tests
via Visual Studio CodesRun and Debug
view to debug the extensions tests.