diff --git a/.gitignore b/.gitignore
index fb0dff55..dc1ed2b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
**/node_modules/
**/out/
**/release/
+/test/manual/generated/**
diff --git a/.prettierignore b/.prettierignore
index e8d3764c..c5bcc308 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -11,6 +11,6 @@
/samples/browser-esm-webpack-typescript-react/dist/*.js
/src/typescript/lib/
/test/manual/samples-all.generated.js
-/test/manual/playground.generated/
+/test/manual/generated/
/website/lib/
/website/typedoc/monaco.d.ts
diff --git a/build/simpleserver.js b/build/simpleserver.js
index 49106d2f..008b9eaa 100644
--- a/build/simpleserver.js
+++ b/build/simpleserver.js
@@ -9,7 +9,7 @@ const fs = require('fs');
const path = require('path');
const http = require('http');
const yaserver = require('yaserver');
-const { REPO_ROOT } = require('./utils');
+const { REPO_ROOT, ensureDir } = require('./utils');
const WEBSITE_GENERATED_PATH = path.join(REPO_ROOT, 'website/playground/new-samples');
@@ -73,7 +73,7 @@ function generateTestSamplesTask() {
'',
'',
'
',
- ' ',
+ ' ',
' ',
'',
'',
@@ -84,7 +84,7 @@ function generateTestSamplesTask() {
'',
'/*----------------------------------------SAMPLE CSS END*/',
'',
- '[<< BACK]
',
+ '[<< BACK]
',
'THIS IS A GENERATED FILE VIA `npm run simpleserver`',
'',
'',
@@ -113,10 +113,13 @@ function generateTestSamplesTask() {
'',
''
];
- fs.writeFileSync(
- path.join(REPO_ROOT, 'test/manual/playground.generated/' + sampleId + '.html'),
- result.join('\n')
+
+ const destination = path.join(
+ REPO_ROOT,
+ 'test/manual/generated/playground/' + sampleId + '.html'
);
+ ensureDir(path.dirname(destination));
+ fs.writeFileSync(destination, result.join('\n'));
locations.push({
path: sampleId + '.html',
name: sample.chapter + ' > ' + sample.name
@@ -128,7 +131,7 @@ function generateTestSamplesTask() {
'',
'',
'',
- ' ',
+ ' ',
'',
'',
'[<< BACK]
',
@@ -136,7 +139,7 @@ function generateTestSamplesTask() {
locations
.map(function (location) {
return (
- '' +
location.name +
@@ -150,7 +153,7 @@ function generateTestSamplesTask() {
''
];
fs.writeFileSync(
- path.join(REPO_ROOT, 'test/manual/playground.generated/index.html'),
+ path.join(REPO_ROOT, 'test/manual/generated/playground/index.html'),
index.join('\n')
);
}
diff --git a/test/manual/index.html b/test/manual/index.html
index 99b8fc44..a44deae9 100644
--- a/test/manual/index.html
+++ b/test/manual/index.html
@@ -6,7 +6,7 @@
Jump to:
- [PLAYGROUND]
+ [PLAYGROUND]
|
[fixed element]
|
diff --git a/test/manual/playground.generated/creating-the-diffeditor-hello-diff-world.html b/test/manual/playground.generated/creating-the-diffeditor-hello-diff-world.html
deleted file mode 100644
index b0b7f0fa..00000000
--- a/test/manual/playground.generated/creating-the-diffeditor-hello-diff-world.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/creating-the-diffeditor-inline-diff-example.html b/test/manual/playground.generated/creating-the-diffeditor-inline-diff-example.html
deleted file mode 100644
index 75cb4968..00000000
--- a/test/manual/playground.generated/creating-the-diffeditor-inline-diff-example.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/creating-the-diffeditor-multi-line-example.html b/test/manual/playground.generated/creating-the-diffeditor-multi-line-example.html
deleted file mode 100644
index 36520f04..00000000
--- a/test/manual/playground.generated/creating-the-diffeditor-multi-line-example.html
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/creating-the-diffeditor-navigating-a-diff.html b/test/manual/playground.generated/creating-the-diffeditor-navigating-a-diff.html
deleted file mode 100644
index 74185342..00000000
--- a/test/manual/playground.generated/creating-the-diffeditor-navigating-a-diff.html
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/creating-the-editor-editor-basic-options.html b/test/manual/playground.generated/creating-the-editor-editor-basic-options.html
deleted file mode 100644
index d6e2b176..00000000
--- a/test/manual/playground.generated/creating-the-editor-editor-basic-options.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/creating-the-editor-hard-wrapping.html b/test/manual/playground.generated/creating-the-editor-hard-wrapping.html
deleted file mode 100644
index c50edde6..00000000
--- a/test/manual/playground.generated/creating-the-editor-hard-wrapping.html
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/creating-the-editor-hello-world.html b/test/manual/playground.generated/creating-the-editor-hello-world.html
deleted file mode 100644
index da647eaa..00000000
--- a/test/manual/playground.generated/creating-the-editor-hello-world.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/creating-the-editor-syntax-highlighting-for-html-elements.html b/test/manual/playground.generated/creating-the-editor-syntax-highlighting-for-html-elements.html
deleted file mode 100644
index 12f71450..00000000
--- a/test/manual/playground.generated/creating-the-editor-syntax-highlighting-for-html-elements.html
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-/* Some example CSS */
-
-@import url("something.css");
-
-body {
- margin: 0;
- padding: 3em 6em;
- font-family: tahoma, arial, sans-serif;
- color: #000;
-}
-
-#navigation a {
- font-weight: bold;
- text-decoration: none !important;
-}
-
-h1 {
- font-size: 2.5em;
-}
-
-h2 {
- font-size: 1.7em;
-}
-
-h1:before, h2:before {
- content: "some contents";
-}
-
-code {
- font-family: courier, monospace;
- font-size: 80%;
- color: #418A8A;
-}
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/customizing-the-appearence-exposed-colors.html b/test/manual/playground.generated/customizing-the-appearence-exposed-colors.html
deleted file mode 100644
index 17fb935b..00000000
--- a/test/manual/playground.generated/customizing-the-appearence-exposed-colors.html
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/customizing-the-appearence-scrollbars.html b/test/manual/playground.generated/customizing-the-appearence-scrollbars.html
deleted file mode 100644
index 0d04a744..00000000
--- a/test/manual/playground.generated/customizing-the-appearence-scrollbars.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/customizing-the-appearence-tokens-and-colors.html b/test/manual/playground.generated/customizing-the-appearence-tokens-and-colors.html
deleted file mode 100644
index 0e4c0091..00000000
--- a/test/manual/playground.generated/customizing-the-appearence-tokens-and-colors.html
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-codelens-provider-example.html b/test/manual/playground.generated/extending-language-services-codelens-provider-example.html
deleted file mode 100644
index ab9801df..00000000
--- a/test/manual/playground.generated/extending-language-services-codelens-provider-example.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-color-provider-example.html b/test/manual/playground.generated/extending-language-services-color-provider-example.html
deleted file mode 100644
index 7c5bffdf..00000000
--- a/test/manual/playground.generated/extending-language-services-color-provider-example.html
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-completion-provider-example.html b/test/manual/playground.generated/extending-language-services-completion-provider-example.html
deleted file mode 100644
index 1c824230..00000000
--- a/test/manual/playground.generated/extending-language-services-completion-provider-example.html
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-configure-javascript-defaults.html b/test/manual/playground.generated/extending-language-services-configure-javascript-defaults.html
deleted file mode 100644
index 448b8557..00000000
--- a/test/manual/playground.generated/extending-language-services-configure-javascript-defaults.html
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-configure-json-defaults.html b/test/manual/playground.generated/extending-language-services-configure-json-defaults.html
deleted file mode 100644
index 6237e00f..00000000
--- a/test/manual/playground.generated/extending-language-services-configure-json-defaults.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-custom-languages.html b/test/manual/playground.generated/extending-language-services-custom-languages.html
deleted file mode 100644
index 82748e29..00000000
--- a/test/manual/playground.generated/extending-language-services-custom-languages.html
+++ /dev/null
@@ -1,158 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-folding-provider-example.html b/test/manual/playground.generated/extending-language-services-folding-provider-example.html
deleted file mode 100644
index 05af7d1b..00000000
--- a/test/manual/playground.generated/extending-language-services-folding-provider-example.html
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-hover-provider-example.html b/test/manual/playground.generated/extending-language-services-hover-provider-example.html
deleted file mode 100644
index b7ce4e8e..00000000
--- a/test/manual/playground.generated/extending-language-services-hover-provider-example.html
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-semantic-tokens-provider-example.html b/test/manual/playground.generated/extending-language-services-semantic-tokens-provider-example.html
deleted file mode 100644
index 1ff766cc..00000000
--- a/test/manual/playground.generated/extending-language-services-semantic-tokens-provider-example.html
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/extending-language-services-symbols-provider-example.html b/test/manual/playground.generated/extending-language-services-symbols-provider-example.html
deleted file mode 100644
index e6821d71..00000000
--- a/test/manual/playground.generated/extending-language-services-symbols-provider-example.html
+++ /dev/null
@@ -1,524 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/index.html b/test/manual/playground.generated/index.html
deleted file mode 100644
index 4d1971e7..00000000
--- a/test/manual/playground.generated/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-Creating the editor > Hello world!
-Creating the editor > Editor basic options
-Creating the editor > Hard wrapping
-Creating the editor > Syntax highlighting for HTML elements
-Interacting with the editor > Adding a command to an editor instance
-Interacting with the editor > Adding an action to an editor instance
-Interacting with the editor > Revealing a position
-Interacting with the editor > Rendering glyphs in the margin
-Interacting with the editor > Line and Inline decorations
-Interacting with the editor > Customizing the line numbers
-Interacting with the editor > Listening to mouse events
-Interacting with the editor > Listening to key events
-Customizing the appearence > Exposed colors
-Customizing the appearence > Scrollbars
-Customizing the appearence > Tokens and colors
-Creating the DiffEditor > Hello diff world!
-Creating the DiffEditor > Multi-line example
-Creating the DiffEditor > Inline Diff Example
-Creating the DiffEditor > Navigating a Diff
-Extending Language Services > Custom languages
-Extending Language Services > Completion provider example
-Extending Language Services > Codelens provider example
-Extending Language Services > Color provider example
-Extending Language Services > Symbols provider example
-Extending Language Services > Folding provider example
-Extending Language Services > Hover provider example
-Extending Language Services > Semantic tokens provider example
-Extending Language Services > Configure JavaScript defaults
-Extending Language Services > Configure JSON defaults
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/interacting-with-the-editor-adding-a-command-to-an-editor-instance.html b/test/manual/playground.generated/interacting-with-the-editor-adding-a-command-to-an-editor-instance.html
deleted file mode 100644
index d3270a1b..00000000
--- a/test/manual/playground.generated/interacting-with-the-editor-adding-a-command-to-an-editor-instance.html
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/interacting-with-the-editor-adding-an-action-to-an-editor-instance.html b/test/manual/playground.generated/interacting-with-the-editor-adding-an-action-to-an-editor-instance.html
deleted file mode 100644
index 928c0025..00000000
--- a/test/manual/playground.generated/interacting-with-the-editor-adding-an-action-to-an-editor-instance.html
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/interacting-with-the-editor-customizing-the-line-numbers.html b/test/manual/playground.generated/interacting-with-the-editor-customizing-the-line-numbers.html
deleted file mode 100644
index e0f6f33b..00000000
--- a/test/manual/playground.generated/interacting-with-the-editor-customizing-the-line-numbers.html
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/interacting-with-the-editor-line-and-inline-decorations.html b/test/manual/playground.generated/interacting-with-the-editor-line-and-inline-decorations.html
deleted file mode 100644
index a946f6af..00000000
--- a/test/manual/playground.generated/interacting-with-the-editor-line-and-inline-decorations.html
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/interacting-with-the-editor-listening-to-key-events.html b/test/manual/playground.generated/interacting-with-the-editor-listening-to-key-events.html
deleted file mode 100644
index fd7d6168..00000000
--- a/test/manual/playground.generated/interacting-with-the-editor-listening-to-key-events.html
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/interacting-with-the-editor-listening-to-mouse-events.html b/test/manual/playground.generated/interacting-with-the-editor-listening-to-mouse-events.html
deleted file mode 100644
index 70c72ba7..00000000
--- a/test/manual/playground.generated/interacting-with-the-editor-listening-to-mouse-events.html
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
- Last 3 events:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/interacting-with-the-editor-rendering-glyphs-in-the-margin.html b/test/manual/playground.generated/interacting-with-the-editor-rendering-glyphs-in-the-margin.html
deleted file mode 100644
index 75b02144..00000000
--- a/test/manual/playground.generated/interacting-with-the-editor-rendering-glyphs-in-the-margin.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/manual/playground.generated/interacting-with-the-editor-revealing-a-position.html b/test/manual/playground.generated/interacting-with-the-editor-revealing-a-position.html
deleted file mode 100644
index 93c4c775..00000000
--- a/test/manual/playground.generated/interacting-with-the-editor-revealing-a-position.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
-
-
-
-[<< BACK]
-THIS IS A GENERATED FILE VIA `npm run simpleserver`
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file