From 8b2d237981fd582e0cd5f3e5747fbe2fe1e4bd2d Mon Sep 17 00:00:00 2001
From: Frank Naegler <frank.naegler@typo3.org>
Date: Mon, 24 Oct 2016 20:48:54 +0200
Subject: [PATCH] [FOLLOWUP][TASK] Remove *.js.map from repository
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The generated JS files contain references to its source maps.
Per default these maps should not be generated.
To prevent side effects the target folder is removed before compiling
the JavaScript files.

Resolves: #78407
Releases: master
Change-Id: I1cc25ef71165d3533e29777d585ae170bdc7f8ae
Reviewed-on: https://review.typo3.org/50349
Reviewed-by: Patricia Tiedemann <pixelaeffchen@googlemail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Bürk <stefan.buerk@impactmedia.de>
Tested-by: Stefan Bürk <stefan.buerk@impactmedia.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
---
 Build/Gruntfile.js                                          | 6 +++++-
 Build/tsconfig.json                                         | 1 +
 .../backend/Resources/Public/JavaScript/ColorPicker.js      | 1 -
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Build/Gruntfile.js b/Build/Gruntfile.js
index 2fb315c8e74c..2c6febe6bf9d 100644
--- a/Build/Gruntfile.js
+++ b/Build/Gruntfile.js
@@ -387,7 +387,11 @@ module.exports = function(grunt) {
 	 * - 2) Compiles all TypeScript files (*.ts) which are located in sysext/<EXTKEY>/Resources/Private/TypeScript/*.ts
 	 * - 3) Copy all generated JavaScript and Map files to public folders
 	 */
-	grunt.registerTask('scripts', ['tslint', 'ts', 'copy:ts_files']);
+	grunt.registerTask('scripts', ['tslint', 'tsclean', 'ts', 'copy:ts_files']);
+
+	grunt.task.registerTask('tsclean', function() {
+		grunt.file.delete("JavaScript");
+	});
 
 	/**
 	 * grunt build task
diff --git a/Build/tsconfig.json b/Build/tsconfig.json
index 2209094af539..a990e606a316 100644
--- a/Build/tsconfig.json
+++ b/Build/tsconfig.json
@@ -2,6 +2,7 @@
     "compilerOptions": {
         "target": "es5",
         "module": "amd",
+        "sourceMap": false,
         "removeComments": false,
         "pretty": true,
         "baseUrl": ".",
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/ColorPicker.js b/typo3/sysext/backend/Resources/Public/JavaScript/ColorPicker.js
index cd1d1e61b498..f7abac04c8db 100644
--- a/typo3/sysext/backend/Resources/Public/JavaScript/ColorPicker.js
+++ b/typo3/sysext/backend/Resources/Public/JavaScript/ColorPicker.js
@@ -38,4 +38,3 @@ define(["require", "exports", 'jquery', "TYPO3/CMS/Core/Contrib/jquery.minicolor
     }());
     return new ColorPicker();
 });
-//# sourceMappingURL=ColorPicker.js.map
\ No newline at end of file
-- 
GitLab