2021-12-07 19:25:29 +08:00
# Contributing
Checkout [MAINTAINING.md ](./MAINTAINING.md ) for common maintaining tasks.
2021-11-06 07:15:13 +08:00
## A brief explanation on the source code structure
2021-11-14 03:50:13 +08:00
This repository contains source code only for Monaco Editor Languages, the core editor source lives in the [vscode repository ](https://github.com/microsoft/vscode ).
2021-11-06 07:15:13 +08:00
2021-11-09 23:30:09 +08:00
| repository | npm module | explanation |
| ----------------------------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [vscode ](https://github.com/microsoft/vscode ) | [monaco-editor-core ](https://www.npmjs.com/package/monaco-editor-core ) | editor core functionality (language agnostic) is shipped out of vscode. |
| [monaco-editor ](https://github.com/microsoft/monaco-editor ) | [monaco-editor ](https://www.npmjs.com/package/monaco-editor ) | the Monaco Editor. |
2021-11-06 07:15:13 +08:00
2021-11-12 20:33:05 +08:00
## Contributing a new tokenizer / a new language
2021-12-20 17:32:57 +08:00
Please understand that we only bundle languages with the monaco editor that have a significant relevance (for example, those that have an article in Wikipedia).
2021-12-07 19:25:29 +08:00
- create `$/src/basic-languages/{myLang}/{myLang}.contribution.ts`
- create `$/src/basic-languages/{myLang}/{myLang}.ts`
- create `$/src/basic-languages/{myLang}/{myLang}.test.ts`
2021-11-14 03:29:32 +08:00
- edit `$/src/basic-languages/monaco.contribution.ts` and register your new language
2022-05-12 16:57:13 +08:00
- create `$/website/index/samples/sample.{myLang}.txt`
2021-11-12 20:33:05 +08:00
```js
2021-12-07 19:25:29 +08:00
import './{myLang}/{myLang}.contribution';
2021-11-12 20:33:05 +08:00
```
2023-02-22 18:39:04 +08:00
## Debugging / Developing The Core Editor
2023-02-23 00:39:35 +08:00
TODO
2021-11-06 07:15:13 +08:00
2023-02-23 00:39:35 +08:00
## Debugging / Developing Language Support
2021-11-06 07:15:13 +08:00
2023-02-23 00:39:35 +08:00
TODO
2021-11-09 23:30:09 +08:00
2023-02-23 00:39:35 +08:00
## Running the editor from source
2021-11-06 07:15:13 +08:00
2023-02-23 00:39:35 +08:00
TODO
2021-11-06 07:15:13 +08:00
## Running the editor tests
```bash
2023-02-23 00:39:35 +08:00
> npm run build-monaco-editor
> npm run test
> npm run compile --prefix webpack-plugin
> npm run package-for-smoketest-webpack
> npm run package-for-smoketest-esbuild
> npm run package-for-smoketest-vite
> npm run package-for-smoketest-parcel --prefix test/smoke/parcel
> npm run smoketest-debug
2021-11-06 07:15:13 +08:00
```
## Running the website locally
2023-02-22 18:39:04 +08:00
TOD