yaml.contribution.js 879 B

123456789101112131415161718192021222324
  1. /*!-----------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Version: 0.31.1(337587859b1c171314b40503171188b6cea6a32a)
  4. * Released under the MIT license
  5. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  6. *-----------------------------------------------------------------------------*/
  7. // src/basic-languages/yaml/yaml.contribution.ts
  8. import { registerLanguage } from "../_.contribution.js";
  9. registerLanguage({
  10. id: "yaml",
  11. extensions: [".yaml", ".yml"],
  12. aliases: ["YAML", "yaml", "YML", "yml"],
  13. mimetypes: ["application/x-yaml", "text/x-yaml"],
  14. loader: () => {
  15. if (false) {
  16. return new Promise((resolve, reject) => {
  17. __require(["vs/basic-languages/yaml/yaml"], resolve, reject);
  18. });
  19. } else {
  20. return import("./yaml.js");
  21. }
  22. }
  23. });