Explorar o código

Move `simpleserver` script off of `gulp`

Alex Dima %!s(int64=3) %!d(string=hai) anos
pai
achega
240b684846
Modificáronse 34 ficheiros con 219 adicións e 208 borrados
  1. 157 0
      build/simpleserver.js
  2. 0 145
      gulpfile.js
  3. 2 2
      monaco-editor/test/playground.generated/creating-the-diffeditor-hello-diff-world.html
  4. 2 2
      monaco-editor/test/playground.generated/creating-the-diffeditor-inline-diff-example.html
  5. 2 2
      monaco-editor/test/playground.generated/creating-the-diffeditor-multi-line-example.html
  6. 2 2
      monaco-editor/test/playground.generated/creating-the-diffeditor-navigating-a-diff.html
  7. 2 2
      monaco-editor/test/playground.generated/creating-the-editor-editor-basic-options.html
  8. 2 2
      monaco-editor/test/playground.generated/creating-the-editor-hard-wrapping.html
  9. 2 2
      monaco-editor/test/playground.generated/creating-the-editor-hello-world.html
  10. 2 2
      monaco-editor/test/playground.generated/creating-the-editor-syntax-highlighting-for-html-elements.html
  11. 2 2
      monaco-editor/test/playground.generated/customizing-the-appearence-exposed-colors.html
  12. 2 2
      monaco-editor/test/playground.generated/customizing-the-appearence-scrollbars.html
  13. 2 2
      monaco-editor/test/playground.generated/customizing-the-appearence-tokens-and-colors.html
  14. 2 2
      monaco-editor/test/playground.generated/extending-language-services-codelens-provider-example.html
  15. 2 2
      monaco-editor/test/playground.generated/extending-language-services-color-provider-example.html
  16. 2 2
      monaco-editor/test/playground.generated/extending-language-services-completion-provider-example.html
  17. 2 2
      monaco-editor/test/playground.generated/extending-language-services-configure-javascript-defaults.html
  18. 2 2
      monaco-editor/test/playground.generated/extending-language-services-configure-json-defaults.html
  19. 2 2
      monaco-editor/test/playground.generated/extending-language-services-custom-languages.html
  20. 2 2
      monaco-editor/test/playground.generated/extending-language-services-folding-provider-example.html
  21. 2 2
      monaco-editor/test/playground.generated/extending-language-services-hover-provider-example.html
  22. 2 2
      monaco-editor/test/playground.generated/extending-language-services-semantic-tokens-provider-example.html
  23. 2 2
      monaco-editor/test/playground.generated/extending-language-services-symbols-provider-example.html
  24. 2 2
      monaco-editor/test/playground.generated/index.html
  25. 2 2
      monaco-editor/test/playground.generated/interacting-with-the-editor-adding-a-command-to-an-editor-instance.html
  26. 2 3
      monaco-editor/test/playground.generated/interacting-with-the-editor-adding-an-action-to-an-editor-instance.html
  27. 2 2
      monaco-editor/test/playground.generated/interacting-with-the-editor-customizing-the-line-numbers.html
  28. 2 2
      monaco-editor/test/playground.generated/interacting-with-the-editor-line-and-inline-decorations.html
  29. 2 2
      monaco-editor/test/playground.generated/interacting-with-the-editor-listening-to-key-events.html
  30. 2 2
      monaco-editor/test/playground.generated/interacting-with-the-editor-listening-to-mouse-events.html
  31. 2 2
      monaco-editor/test/playground.generated/interacting-with-the-editor-rendering-glyphs-in-the-margin.html
  32. 2 2
      monaco-editor/test/playground.generated/interacting-with-the-editor-revealing-a-position.html
  33. 1 1
      monaco-editor/test/samples-all.generated.js
  34. 1 1
      package.json

+ 157 - 0
build/simpleserver.js

@@ -0,0 +1,157 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+//@ts-check
+
+const fs = require('fs');
+const path = require('path');
+const http = require('http');
+const yaserver = require('yaserver');
+const { REPO_ROOT } = require('./utils');
+
+const WEBSITE_GENERATED_PATH = path.join(REPO_ROOT, 'monaco-editor/website/playground/new-samples');
+
+generateTestSamplesTask();
+
+const SERVER_ROOT = path.normalize(path.join(REPO_ROOT, '../'));
+createSimpleServer(SERVER_ROOT, 8080);
+createSimpleServer(SERVER_ROOT, 8088);
+
+function generateTestSamplesTask() {
+	const sampleNames = fs.readdirSync(path.join(REPO_ROOT, 'monaco-editor/test/samples'));
+	const samples = sampleNames.map((sampleName) => {
+		const samplePath = path.join(REPO_ROOT, 'monaco-editor/test/samples', sampleName);
+		const sampleContent = fs.readFileSync(samplePath).toString();
+		return {
+			name: sampleName,
+			content: sampleContent
+		};
+	});
+	const prefix =
+		'//This is a generated file via `npm run simpleserver`\ndefine([], function() { return';
+	const suffix = '; });';
+	fs.writeFileSync(
+		path.join(REPO_ROOT, 'monaco-editor/test/samples-all.generated.js'),
+		prefix + JSON.stringify(samples, null, '\t') + suffix
+	);
+
+	/** @type {{ chapter: string; name: string; id: string; path: string; }[]} */
+	const PLAY_SAMPLES = require(path.join(WEBSITE_GENERATED_PATH, 'all.js')).PLAY_SAMPLES;
+	/** @type {{ path: string; name: string; }[]} */
+	const locations = [];
+	for (let i = 0; i < PLAY_SAMPLES.length; i++) {
+		const sample = PLAY_SAMPLES[i];
+		const sampleId = sample.id;
+		const samplePath = path.join(WEBSITE_GENERATED_PATH, sample.path);
+
+		const html = fs.readFileSync(path.join(samplePath, 'sample.html'));
+		const js = fs.readFileSync(path.join(samplePath, 'sample.js'));
+		const css = fs.readFileSync(path.join(samplePath, 'sample.css'));
+
+		const result = [
+			'<!DOCTYPE html>',
+			'<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->',
+			'<html>',
+			'<head>',
+			'	<base href="..">',
+			'	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />',
+			'</head>',
+			'<body>',
+			'<style>',
+			'/*----------------------------------------SAMPLE CSS START*/',
+			'',
+			css,
+			'',
+			'/*----------------------------------------SAMPLE CSS END*/',
+			'</style>',
+			'<a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>',
+			'THIS IS A GENERATED FILE VIA `npm run simpleserver`',
+			'',
+			'<div id="bar" style="margin-bottom: 6px;"></div>',
+			'',
+			'<div style="clear:both"></div>',
+			'<div id="outer-container" style="width:800px;height:450px;border: 1px solid grey">',
+			'<!-- ----------------------------------------SAMPLE HTML START-->',
+			'',
+			html,
+			'',
+			'<!-- ----------------------------------------SAMPLE HTML END-->',
+			'</div>',
+			'<div style="clear:both"></div>',
+			'',
+			'<script src="../../metadata.js"></script>',
+			'<script src="dev-setup.js"></script>',
+			'<script>',
+			'loadEditor(function() {',
+			'/*----------------------------------------SAMPLE JS START*/',
+			'',
+			js,
+			'',
+			'/*----------------------------------------SAMPLE JS END*/',
+			'});',
+			'</script>',
+			'</body>',
+			'</html>'
+		];
+		fs.writeFileSync(
+			path.join(REPO_ROOT, 'monaco-editor/test/playground.generated/' + sampleId + '.html'),
+			result.join('\n')
+		);
+		locations.push({
+			path: sampleId + '.html',
+			name: sample.chapter + ' &gt; ' + sample.name
+		});
+	}
+
+	const index = [
+		'<!DOCTYPE html>',
+		'<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->',
+		'<html>',
+		'<head>',
+		'	<base href="..">',
+		'</head>',
+		'<body>',
+		'<a class="loading-opts" href="index.html">[&lt;&lt; BACK]</a><br/>',
+		'THIS IS A GENERATED FILE VIA `npm run simpleserver`<br/><br/>',
+		locations
+			.map(function (location) {
+				return (
+					'<a class="loading-opts" href="playground.generated/' +
+					location.path +
+					'">' +
+					location.name +
+					'</a>'
+				);
+			})
+			.join('<br/>\n'),
+		'<script src="../../metadata.js"></script>',
+		'<script src="dev-setup.js"></script>',
+		'</body>',
+		'</html>'
+	];
+	fs.writeFileSync(
+		path.join(REPO_ROOT, 'monaco-editor/test/playground.generated/index.html'),
+		index.join('\n')
+	);
+}
+
+/**
+ * @param {string} rootDir
+ * @param {number} port
+ */
+function createSimpleServer(rootDir, port) {
+	yaserver
+		.createServer({
+			rootDir: rootDir
+		})
+		.then((staticServer) => {
+			const server = http.createServer((request, response) => {
+				return staticServer.handle(request, response);
+			});
+			server.listen(port, '127.0.0.1', () => {
+				console.log(`Running at http://127.0.0.1:${port}`);
+			});
+		});
+}

+ 0 - 145
gulpfile.js

@@ -4,13 +4,10 @@ const path = require('path');
 const fs = require('fs');
 const rimraf = require('rimraf');
 const cp = require('child_process');
-const yaserver = require('yaserver');
-const http = require('http');
 const CleanCSS = require('clean-css');
 const uncss = require('uncss');
 const File = require('vinyl');
 
-const WEBSITE_GENERATED_PATH = path.join(__dirname, 'monaco-editor/website/playground/new-samples');
 /** @type {string} */
 const MONACO_EDITOR_VERSION = (function () {
 	const packageJsonPath = path.join(__dirname, 'package.json');
@@ -254,145 +251,3 @@ gulp.task('prepare-website-branch', async function () {
 	});
 	console.log('RUN monaco-editor-website>git push origin gh-pages --force');
 });
-
-const generateTestSamplesTask = function () {
-	var sampleNames = fs.readdirSync(path.join(__dirname, 'monaco-editor/test/samples'));
-	var samples = sampleNames.map(function (sampleName) {
-		var samplePath = path.join(__dirname, 'monaco-editor/test/samples', sampleName);
-		var sampleContent = fs.readFileSync(samplePath).toString();
-		return {
-			name: sampleName,
-			content: sampleContent
-		};
-	});
-	var prefix =
-		'//This is a generated file via gulp generate-test-samples\ndefine([], function() { return';
-	var suffix = '; });';
-	fs.writeFileSync(
-		path.join(__dirname, 'monaco-editor/test/samples-all.generated.js'),
-		prefix + JSON.stringify(samples, null, '\t') + suffix
-	);
-
-	var PLAY_SAMPLES = require(path.join(WEBSITE_GENERATED_PATH, 'all.js')).PLAY_SAMPLES;
-	var locations = [];
-	for (var i = 0; i < PLAY_SAMPLES.length; i++) {
-		var sample = PLAY_SAMPLES[i];
-		var sampleId = sample.id;
-		var samplePath = path.join(WEBSITE_GENERATED_PATH, sample.path);
-
-		var html = fs.readFileSync(path.join(samplePath, 'sample.html'));
-		var js = fs.readFileSync(path.join(samplePath, 'sample.js'));
-		var css = fs.readFileSync(path.join(samplePath, 'sample.css'));
-
-		var result = [
-			'<!DOCTYPE html>',
-			'<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->',
-			'<html>',
-			'<head>',
-			'	<base href="..">',
-			'	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />',
-			'</head>',
-			'<body>',
-			'<style>',
-			'/*----------------------------------------SAMPLE CSS START*/',
-			'',
-			css,
-			'',
-			'/*----------------------------------------SAMPLE CSS END*/',
-			'</style>',
-			'<a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>',
-			'THIS IS A GENERATED FILE VIA gulp generate-test-samples',
-			'',
-			'<div id="bar" style="margin-bottom: 6px;"></div>',
-			'',
-			'<div style="clear:both"></div>',
-			'<div id="outer-container" style="width:800px;height:450px;border: 1px solid grey">',
-			'<!-- ----------------------------------------SAMPLE HTML START-->',
-			'',
-			html,
-			'',
-			'<!-- ----------------------------------------SAMPLE HTML END-->',
-			'</div>',
-			'<div style="clear:both"></div>',
-			'',
-			'<script src="../../metadata.js"></script>',
-			'<script src="dev-setup.js"></script>',
-			'<script>',
-			'loadEditor(function() {',
-			'/*----------------------------------------SAMPLE JS START*/',
-			'',
-			js,
-			'',
-			'/*----------------------------------------SAMPLE JS END*/',
-			'});',
-			'</script>',
-			'</body>',
-			'</html>'
-		];
-		fs.writeFileSync(
-			path.join(__dirname, 'monaco-editor/test/playground.generated/' + sampleId + '.html'),
-			result.join('\n')
-		);
-		locations.push({
-			path: sampleId + '.html',
-			name: sample.chapter + ' &gt; ' + sample.name
-		});
-	}
-
-	var index = [
-		'<!DOCTYPE html>',
-		'<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->',
-		'<html>',
-		'<head>',
-		'	<base href="..">',
-		'</head>',
-		'<body>',
-		'<a class="loading-opts" href="index.html">[&lt;&lt; BACK]</a><br/>',
-		'THIS IS A GENERATED FILE VIA gulp generate-test-samples<br/><br/>',
-		locations
-			.map(function (location) {
-				return (
-					'<a class="loading-opts" href="playground.generated/' +
-					location.path +
-					'">' +
-					location.name +
-					'</a>'
-				);
-			})
-			.join('<br/>\n'),
-		'<script src="../../metadata.js"></script>',
-		'<script src="dev-setup.js"></script>',
-		'</body>',
-		'</html>'
-	];
-	fs.writeFileSync(
-		path.join(__dirname, 'monaco-editor/test/playground.generated/index.html'),
-		index.join('\n')
-	);
-};
-
-function createSimpleServer(rootDir, port) {
-	yaserver
-		.createServer({
-			rootDir: rootDir
-		})
-		.then((staticServer) => {
-			const server = http.createServer((request, response) => {
-				return staticServer.handle(request, response);
-			});
-			server.listen(port, '127.0.0.1', () => {
-				console.log(`Running at http://127.0.0.1:${port}`);
-			});
-		});
-}
-
-gulp.task('generate-test-samples', taskSeries(generateTestSamplesTask));
-
-gulp.task(
-	'simpleserver',
-	taskSeries(generateTestSamplesTask, function () {
-		const SERVER_ROOT = path.normalize(path.join(__dirname, '../'));
-		createSimpleServer(SERVER_ROOT, 8080);
-		createSimpleServer(SERVER_ROOT, 8088);
-	})
-);

+ 2 - 2
monaco-editor/test/playground.generated/creating-the-diffeditor-hello-diff-world.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/creating-the-diffeditor-inline-diff-example.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/creating-the-diffeditor-multi-line-example.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/creating-the-diffeditor-navigating-a-diff.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/creating-the-editor-editor-basic-options.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/creating-the-editor-hard-wrapping.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/creating-the-editor-hello-world.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/creating-the-editor-syntax-highlighting-for-html-elements.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/customizing-the-appearence-exposed-colors.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/customizing-the-appearence-scrollbars.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -24,7 +24,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/customizing-the-appearence-tokens-and-colors.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-codelens-provider-example.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-color-provider-example.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-completion-provider-example.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-configure-javascript-defaults.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-configure-json-defaults.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-custom-languages.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-folding-provider-example.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-hover-provider-example.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-semantic-tokens-provider-example.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/extending-language-services-symbols-provider-example.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/index.html

@@ -1,12 +1,12 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
 </head>
 <body>
 <a class="loading-opts" href="index.html">[&lt;&lt; BACK]</a><br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples<br/><br/>
+THIS IS A GENERATED FILE VIA `npm run simpleserver`<br/><br/>
 <a class="loading-opts" href="playground.generated/creating-the-editor-hello-world.html">Creating the editor &gt; Hello world!</a><br/>
 <a class="loading-opts" href="playground.generated/creating-the-editor-editor-basic-options.html">Creating the editor &gt; Editor basic options</a><br/>
 <a class="loading-opts" href="playground.generated/creating-the-editor-hard-wrapping.html">Creating the editor &gt; Hard wrapping</a><br/>

+ 2 - 2
monaco-editor/test/playground.generated/interacting-with-the-editor-adding-a-command-to-an-editor-instance.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 3
monaco-editor/test/playground.generated/interacting-with-the-editor-adding-an-action-to-an-editor-instance.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 
@@ -85,7 +85,6 @@ editor.addAction({
 	// @param editor The editor instance is passed in as a convenience
 	run: function (ed) {
 		alert("i'm running => " + ed.getPosition());
-		return null;
 	}
 });
 

+ 2 - 2
monaco-editor/test/playground.generated/interacting-with-the-editor-customizing-the-line-numbers.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/interacting-with-the-editor-line-and-inline-decorations.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -27,7 +27,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/interacting-with-the-editor-listening-to-key-events.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/interacting-with-the-editor-listening-to-mouse-events.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -20,7 +20,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/interacting-with-the-editor-rendering-glyphs-in-the-margin.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -20,7 +20,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 2 - 2
monaco-editor/test/playground.generated/interacting-with-the-editor-revealing-a-position.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- THIS IS A GENERATED FILE VIA gulp generate-test-samples -->
+<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
 <html>
 <head>
 	<base href="..">
@@ -14,7 +14,7 @@
 /*----------------------------------------SAMPLE CSS END*/
 </style>
 <a class="loading-opts" href="playground.generated/index.html">[&lt;&lt; BACK]</a> <br/>
-THIS IS A GENERATED FILE VIA gulp generate-test-samples
+THIS IS A GENERATED FILE VIA `npm run simpleserver`
 
 <div id="bar" style="margin-bottom: 6px;"></div>
 

+ 1 - 1
monaco-editor/test/samples-all.generated.js

@@ -1,4 +1,4 @@
-//This is a generated file via gulp generate-test-samples
+//This is a generated file via `npm run simpleserver`
 define([], function() { return[
 	{
 		"name": "run-editor-failing-js.txt",

+ 1 - 1
package.json

@@ -16,7 +16,7 @@
 		"prettier": "prettier --write .",
 		"pretty-quick": "pretty-quick --staged",
 		"release": "node ./build/build.js && node ./build/release.js && node ./build/importEditorWebpackPlugin.js",
-		"simpleserver": "gulp simpleserver",
+		"simpleserver": "node ./build/simpleserver",
 		"smoketest-debug": "node ./test/smoke/runner.js --debug-tests",
 		"smoketest": "node ./test/smoke/runner.js",
 		"test": "node ./test/unit/all.js",