2016-09-17 02:08:31 +08:00
# Monaco Languages [![Build Status](https://travis-ci.org/Microsoft/monaco-languages.svg?branch=master)](https://travis-ci.org/Microsoft/monaco-languages)
2016-06-10 01:01:53 +08:00
Colorization and configuration supports for multiple languages for the Monaco Editor:
![monaco-languages ](https://cloud.githubusercontent.com/assets/5047891/15938606/1fd4bac6-2e74-11e6-8839-d455da8bc8a7.gif )
* bat
* coffee script
* cpp
* csharp
* fsharp
* go
2016-09-17 07:16:53 +08:00
* handlebars
2016-09-16 18:58:24 +08:00
* html
2016-06-10 01:01:53 +08:00
* ini
* jade
* lua
* objective-c
2016-07-06 13:50:57 +08:00
* postiats
2016-09-17 00:22:20 +08:00
* php
2016-06-10 01:01:53 +08:00
* powershell
* python
* r
2016-09-18 16:40:14 +08:00
* razor
2016-06-10 01:01:53 +08:00
* ruby
* sql
* swift
* vb
* xml
2016-09-16 18:58:24 +08:00
Also `css` dialects:
2016-07-14 06:19:31 +08:00
* css
* less
* scss
2016-08-30 17:54:17 +08:00
## Issues
Please file issues concering `monaco-languages` in the [`monaco-editor`-repository ](https://github.com/Microsoft/monaco-editor/issues ).
2016-06-10 01:01:53 +08:00
## Installing
This npm module is bundled and distributed in the [monaco-editor ](https://www.npmjs.com/package/monaco-editor ) npm module.
2016-06-20 21:02:47 +08:00
## Dev: cheat sheet
2016-06-10 01:01:53 +08:00
2016-06-20 21:02:47 +08:00
* initial setup with `npm install .`
2016-06-10 01:01:53 +08:00
* compile with `npm run watch`
* test with `npm run test`
* bundle with `npm run prepublish`
2016-06-20 21:02:47 +08:00
## Dev: Adding a new language
* create `$/src/myLang.ts`
* create `$/test/myLang.test.ts`
* restart compilation with `$> npm run watch`
* edit `$/src/monaco.contribution.ts` and register your new language:
2016-09-17 02:00:19 +08:00
```js
2016-09-17 01:59:24 +08:00
registerLanguage({
id: 'sql',
extensions: [ '.sql' ],
aliases: [ 'SQL' ],
module: './sql'
});
2016-09-17 02:00:19 +08:00
```
2016-06-20 21:02:47 +08:00
* edit `$/test/all.js` and load your new language while testing
2016-09-17 02:00:19 +08:00
```js
2016-09-17 01:59:24 +08:00
'out/test/sql.test',
2016-09-17 02:00:19 +08:00
```
2016-06-20 21:02:47 +08:00
* edit `$/gulpfile.js` and ship your new language
2016-09-17 02:00:19 +08:00
```js
2016-09-17 01:59:24 +08:00
bundleOne('src/sql'),
2016-09-17 02:00:19 +08:00
```
2016-06-20 21:02:47 +08:00
2016-06-28 23:54:26 +08:00
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct ](https://opensource.microsoft.com/codeofconduct/ ). For more information see the [Code of Conduct FAQ ](https://opensource.microsoft.com/codeofconduct/faq/ ) or contact [opencode@microsoft.com ](mailto:opencode@microsoft.com ) with any additional questions or comments.
2016-06-20 21:02:47 +08:00
2016-06-10 01:01:53 +08:00
## License
2016-06-10 01:02:35 +08:00
[MIT ](https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md )