diff --git a/.prettierignore b/.prettierignore index 2d5efb2..e385c65 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,3 @@ -/lib/esm/_deps/ +/dist/ +/lib/ +/out/ diff --git a/LICENSE.md b/LICENSE.md index f8a94f6..5ae193c 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +The MIT License (MIT) + +Copyright (c) Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index f04a18e..ba8ba59 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ # Monaco YAML YAML language plugin for the Monaco Editor. It provides the following features when editing YAML files: -* Code completion, based on JSON schemas or by looking at similar objects in the same file -* Hovers, based on JSON schemas -* Validation: Syntax errors and schema validation -* Formatting -* Document Symbols -* Syntax highlighting -* Automatically load remote schema files (by enabling DiagnosticsOptions.enableSchemaRequest) + +- Code completion, based on JSON schemas or by looking at similar objects in the same file +- Hovers, based on JSON schemas +- Validation: Syntax errors and schema validation +- Formatting +- Document Symbols +- Syntax highlighting +- Automatically load remote schema files (by enabling DiagnosticsOptions.enableSchemaRequest) Schemas can also be provided by configuration. See [here](https://github.com/Microsoft/monaco-json/blob/master/src/monaco.d.ts) for the API that the JSON plugin offers to configure the JSON language support. @@ -20,15 +21,17 @@ See `examples` directory for esm and umd examples. ## Development -* `git clone https://github.com/pengx17/monaco-yaml` -* `cd monaco-yaml` -* `yarn` +- `git clone https://github.com/pengx17/monaco-yaml` +- `cd monaco-yaml` +- `yarn` A running example: ![demo-image](test-demo.png) ## Credits + - https://github.com/redhat-developer/yaml-language-server ## License + [MIT](https://github.com/pengx17/monaco-yaml/blob/master/LICENSE.md) diff --git a/examples/react-webpack-worker-loader/README.md b/examples/react-webpack-worker-loader/README.md index 83e342f..3a3f0ff 100644 --- a/examples/react-webpack-worker-loader/README.md +++ b/examples/react-webpack-worker-loader/README.md @@ -1,9 +1,9 @@ # Demo: React + Weback + Worker Loader + Babel To run: + ``` yarn && yarn start ``` The demo will open in your browser. See (index.jsx)[index.jsx#L34-L36] for the schema loaded. - diff --git a/examples/react-webpack/README.md b/examples/react-webpack/README.md index fb1a1ae..773b672 100644 --- a/examples/react-webpack/README.md +++ b/examples/react-webpack/README.md @@ -1,9 +1,9 @@ # Demo: React + Weback + Babel To run: + ``` yarn && yarn start ``` The demo will open in your browser. See (index.jsx)[index.jsx#L34-L36] for the schema loaded. - diff --git a/package.json b/package.json index ba3c603..bdfa7bc 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "build": "yarn compile && yarn bundle", "prepare": "husky install", "prepack": "yarn build", - "lint": "prettier \"{src,test}/**/*.{json,scss,html,ts}\" --write" + "lint": "prettier \"**/*.{css,js,json,jsx,html,md,ts}\" --check" }, "main": "./lib/esm/monaco.contribution.js", "module": "./lib/esm/monaco.contribution.js",