mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 10:25:42 +01:00
Splits CONTRIBUTING into CONTRIBUTING and MAINTAINING.
This commit is contained in:
parent
5414af93ba
commit
3f9b0c5573
2 changed files with 77 additions and 72 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
# Contributing & Maintaining
|
# Contributing
|
||||||
|
|
||||||
|
Checkout [MAINTAINING.md](./MAINTAINING.md) for common maintaining tasks.
|
||||||
|
|
||||||
## A brief explanation on the source code structure
|
## A brief explanation on the source code structure
|
||||||
|
|
||||||
|
|
@ -11,22 +13,15 @@ This repository contains source code only for Monaco Editor Languages, the core
|
||||||
|
|
||||||
## Contributing a new tokenizer / a new language
|
## Contributing a new tokenizer / a new language
|
||||||
|
|
||||||
- create `$/src/basic-languages/myLang/myLang.contribution.ts`
|
- create `$/src/basic-languages/{myLang}/{myLang}.contribution.ts`
|
||||||
- create `$/src/basic-languages/myLang/myLang.ts`
|
- create `$/src/basic-languages/{myLang}/{myLang}.ts`
|
||||||
- create `$/src/basic-languages/myLang/myLang.test.ts`
|
- create `$/src/basic-languages/{myLang}/{myLang}.test.ts`
|
||||||
- edit `$/src/basic-languages/monaco.contribution.ts` and register your new language
|
- edit `$/src/basic-languages/monaco.contribution.ts` and register your new language
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import './myLang/myLang.contribution';
|
import './{myLang}/{myLang}.contribution';
|
||||||
```
|
```
|
||||||
|
|
||||||
## Updating TypeScript
|
|
||||||
|
|
||||||
- change typescript's version in `package.json`.
|
|
||||||
- execute `npm install .`
|
|
||||||
- execute `npm run import-typescript`
|
|
||||||
- adopt new APIs
|
|
||||||
|
|
||||||
## Running the editor from source
|
## Running the editor from source
|
||||||
|
|
||||||
You need to have all the build setup of VS Code to be able to build the Monaco Editor.
|
You need to have all the build setup of VS Code to be able to build the Monaco Editor.
|
||||||
|
|
@ -104,63 +99,3 @@ Open [http://localhost:8080/monaco-editor/test/manual/?editor=src](http://localh
|
||||||
# open http://localhost:8080/monaco-editor-website/
|
# open http://localhost:8080/monaco-editor-website/
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Shipping a new monaco-editor npm module
|
|
||||||
|
|
||||||
#### 0.
|
|
||||||
|
|
||||||
- make sure you have `https://github.com/microsoft/vscode-loc` checked out next to the `vscode` folder.
|
|
||||||
|
|
||||||
#### 1. Ship a new `monaco-editor-core` npm module
|
|
||||||
|
|
||||||
- bump version in `/src/vscode/build/monaco/package.json`
|
|
||||||
- **[important]** push all local changes to the remote to get a good public commit id.
|
|
||||||
- generate npm package `/src/vscode> yarn gulp editor-distro`
|
|
||||||
- publish npm package `/src/vscode/out-monaco-editor-core> npm publish`
|
|
||||||
|
|
||||||
#### 2. Adopt new `monaco-editor-core` version
|
|
||||||
|
|
||||||
- edit `/src/monaco-editor/package.json` and update the version of [`monaco-editor-core`](https://www.npmjs.com/package/monaco-editor-core)
|
|
||||||
|
|
||||||
```sh
|
|
||||||
# fetch latest deps
|
|
||||||
/src/monaco-editor> npm install .
|
|
||||||
```
|
|
||||||
|
|
||||||
#### 4. Generate and try out the local release
|
|
||||||
|
|
||||||
- run the editor smoketest via CI or [manually](#running-the-editor-tests).
|
|
||||||
|
|
||||||
#### 5. Update release note.
|
|
||||||
|
|
||||||
- API Changes / Breaking Changes / New and noteworthy
|
|
||||||
- Thank you ([use this tool](https://vscode-tools.azurewebsites.net/))
|
|
||||||
|
|
||||||
#### 6. Publish
|
|
||||||
|
|
||||||
- `/src/monaco-editor> npm version minor`
|
|
||||||
- `/src/monaco-editor> npm run release`
|
|
||||||
- `/src/monaco-editor/release> npm publish`
|
|
||||||
- `/src/monaco-editor> git push origin v0.50.0`
|
|
||||||
|
|
||||||
#### 7. Update Website
|
|
||||||
|
|
||||||
- `/src/monaco-editor> npm run website`
|
|
||||||
|
|
||||||
#### 8. Publish new webpack plugin
|
|
||||||
|
|
||||||
- **TBD**
|
|
||||||
- https://github.com/microsoft/monaco-editor/tree/main/webpack-plugin
|
|
||||||
- `npm install .`
|
|
||||||
- `npm run import-editor`
|
|
||||||
- if there are no changes generated after the script:
|
|
||||||
- update the peer dependency in `package.json` and use the `||` format e.g. `"monaco-editor": "0.27.x || 0.28.x"`
|
|
||||||
- update the version matrix in the README.md and add the new editor version to the plugin's current major version
|
|
||||||
- use `npm version minor`
|
|
||||||
- publish using `npm publish`
|
|
||||||
- if there are any changes generated after the script:
|
|
||||||
- update the peer dependency in `package.json` e.g. `"monaco-editor": "0.29.x"`
|
|
||||||
- update the version matrix in the README.md and add a new row with the new major version
|
|
||||||
- use `npm version major`
|
|
||||||
- publish using `npm publish`
|
|
||||||
- remember to push tags upstream
|
|
||||||
|
|
|
||||||
70
MAINTAINING.md
Normal file
70
MAINTAINING.md
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
# Maintaining
|
||||||
|
|
||||||
|
(For maintainers)
|
||||||
|
|
||||||
|
## Updating TypeScript
|
||||||
|
|
||||||
|
- change typescript's version in `package.json`.
|
||||||
|
- execute `npm install .`
|
||||||
|
- execute `npm run import-typescript`
|
||||||
|
- adopt new APIs
|
||||||
|
|
||||||
|
## Shipping a new monaco-editor npm module
|
||||||
|
|
||||||
|
#### 0.
|
||||||
|
|
||||||
|
- make sure you have `https://github.com/microsoft/vscode-loc` checked out next to the `vscode` folder.
|
||||||
|
|
||||||
|
#### 1. Ship a new `monaco-editor-core` npm module
|
||||||
|
|
||||||
|
- bump version in `/src/vscode/build/monaco/package.json`
|
||||||
|
- **[important]** push all local changes to the remote to get a good public commit id.
|
||||||
|
- generate npm package `/src/vscode> yarn gulp editor-distro`
|
||||||
|
- publish npm package `/src/vscode/out-monaco-editor-core> npm publish`
|
||||||
|
|
||||||
|
#### 2. Adopt new `monaco-editor-core` version
|
||||||
|
|
||||||
|
- edit `/src/monaco-editor/package.json` and update the version of [`monaco-editor-core`](https://www.npmjs.com/package/monaco-editor-core)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# fetch latest deps
|
||||||
|
/src/monaco-editor> npm install .
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 4. Generate and try out the local release
|
||||||
|
|
||||||
|
- run the editor smoketest via CI or [manually](#running-the-editor-tests).
|
||||||
|
|
||||||
|
#### 5. Update release note.
|
||||||
|
|
||||||
|
- API Changes / Breaking Changes / New and noteworthy
|
||||||
|
- Thank you ([use this tool](https://vscode-tools.azurewebsites.net/))
|
||||||
|
|
||||||
|
#### 6. Publish
|
||||||
|
|
||||||
|
- `/src/monaco-editor> npm version minor`
|
||||||
|
- `/src/monaco-editor> npm run release`
|
||||||
|
- `/src/monaco-editor/release> npm publish`
|
||||||
|
- `/src/monaco-editor> git push origin v0.50.0`
|
||||||
|
|
||||||
|
#### 7. Update Website
|
||||||
|
|
||||||
|
- `/src/monaco-editor> npm run website`
|
||||||
|
|
||||||
|
#### 8. Publish new webpack plugin
|
||||||
|
|
||||||
|
- **TBD**
|
||||||
|
- https://github.com/microsoft/monaco-editor/tree/main/webpack-plugin
|
||||||
|
- `npm install .`
|
||||||
|
- `npm run import-editor`
|
||||||
|
- if there are no changes generated after the script:
|
||||||
|
- update the peer dependency in `package.json` and use the `||` format e.g. `"monaco-editor": "0.27.x || 0.28.x"`
|
||||||
|
- update the version matrix in the README.md and add the new editor version to the plugin's current major version
|
||||||
|
- use `npm version minor`
|
||||||
|
- publish using `npm publish`
|
||||||
|
- if there are any changes generated after the script:
|
||||||
|
- update the peer dependency in `package.json` e.g. `"monaco-editor": "0.29.x"`
|
||||||
|
- update the version matrix in the README.md and add a new row with the new major version
|
||||||
|
- use `npm version major`
|
||||||
|
- publish using `npm publish`
|
||||||
|
- remember to push tags upstream
|
||||||
Loading…
Add table
Add a link
Reference in a new issue