| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 'use strict'; | 4 'use strict'; |
| 5 const fs = require('fs'); | 5 const fs = require('fs'); |
| 6 const path = require('path'); | 6 const path = require('path'); |
| 7 | 7 |
| 8 const utils = require('../utils'); | 8 const utils = require('../utils'); |
| 9 | 9 |
| 10 const FRONTEND_PATH = path.resolve(__dirname, '..', '..', 'front_end'); | 10 const FRONTEND_PATH = path.resolve(__dirname, '..', '..', 'front_end'); |
| 11 const BUILD_GN_PATH = path.resolve(__dirname, '..', '..', 'BUILD.gn'); | 11 const BUILD_GN_PATH = path.resolve(__dirname, '..', '..', 'BUILD.gn'); |
| 12 const SPECIAL_CASE_NAMESPACES_PATH = path.resolve(__dirname, '..', 'special_case
_namespaces.json'); | 12 const SPECIAL_CASE_NAMESPACES_PATH = path.resolve(__dirname, '..', 'special_case
_namespaces.json'); |
| 13 | 13 |
| 14 const APPLICATION_DESCRIPTORS = [ | 14 const APPLICATION_DESCRIPTORS = [ |
| 15 'inspector.json', | 15 'inspector.json', |
| 16 'toolbox.json', | 16 'toolbox.json', |
| 17 'integration_test_runner.json', |
| 17 'unit_test_runner.json', | 18 'unit_test_runner.json', |
| 18 'formatter_worker.json', | 19 'formatter_worker.json', |
| 19 'heap_snapshot_worker.json', | 20 'heap_snapshot_worker.json', |
| 20 'utility_shared_worker.json', | 21 'utility_shared_worker.json', |
| 21 ]; | 22 ]; |
| 22 | 23 |
| 23 // Replace based on specified transformation | 24 // Replace based on specified transformation |
| 24 const MODULES_TO_REMOVE = []; | 25 const MODULES_TO_REMOVE = []; |
| 25 | 26 |
| 26 const JS_FILES_MAPPING = [ | 27 const JS_FILES_MAPPING = [ |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 return string.split('') | 683 return string.split('') |
| 683 .map(function(char) { | 684 .map(function(char) { |
| 684 var charCode = char.charCodeAt(0); | 685 var charCode = char.charCodeAt(0); |
| 685 return charCode > 127 ? unicodeCharEscape(charCode) : char; | 686 return charCode > 127 ? unicodeCharEscape(charCode) : char; |
| 686 }) | 687 }) |
| 687 .join(''); | 688 .join(''); |
| 688 } | 689 } |
| 689 | 690 |
| 690 if (require.main === module) | 691 if (require.main === module) |
| 691 extractModule(); | 692 extractModule(); |
| OLD | NEW |