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 'unit_test_runner.json', | 17 'unit_test_runner.json', |
18 'formatter_worker.json', | 18 'formatter_worker.json', |
19 'heap_snapshot_worker.json', | 19 'heap_snapshot_worker.json', |
20 'utility_shared_worker.json', | 20 'utility_shared_worker.json', |
21 ]; | 21 ]; |
22 | 22 |
23 // Replace based on specified transformation | 23 // Replace based on specified transformation |
24 const MODULES_TO_REMOVE = []; | 24 const MODULES_TO_REMOVE = []; |
25 | 25 |
26 const JS_FILES_MAPPING = [ | 26 const JS_FILES_MAPPING = [ |
27 {file: 'sdk/ConsoleModel.js', new: 'console_model'}, | 27 {file: 'sdk/NetworkLog.js', new: 'network_log'}, |
| 28 {file: 'sdk/HAREntry.js', new: 'network_log'}, |
28 ]; | 29 ]; |
29 | 30 |
30 const MODULE_MAPPING = { | 31 const MODULE_MAPPING = { |
31 console_model: { | 32 network_log: { |
32 dependencies: ['sdk'], | 33 dependencies: ['sdk'], |
33 dependents: ['bindings', 'console', 'main'], | 34 dependents: ['audits', 'components', 'console_model', 'extensions', 'main',
'network'], |
34 applications: ['inspector.json'], | 35 applications: ['inspector.json'], |
35 autostart: true, // set to autostart because of extensions | 36 autostart: true, // set to autostart because of extensions |
36 }, | 37 }, |
37 }; | 38 }; |
38 | 39 |
39 const NEW_DEPENDENCIES_BY_EXISTING_MODULES = { | 40 const NEW_DEPENDENCIES_BY_EXISTING_MODULES = { |
40 // resources: ['components'], | 41 // resources: ['components'], |
41 }; | 42 }; |
42 | 43 |
43 const REMOVE_DEPENDENCIES_BY_EXISTING_MODULES = {}; | 44 const REMOVE_DEPENDENCIES_BY_EXISTING_MODULES = {}; |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 return string.split('') | 679 return string.split('') |
679 .map(function(char) { | 680 .map(function(char) { |
680 var charCode = char.charCodeAt(0); | 681 var charCode = char.charCodeAt(0); |
681 return charCode > 127 ? unicodeCharEscape(charCode) : char; | 682 return charCode > 127 ? unicodeCharEscape(charCode) : char; |
682 }) | 683 }) |
683 .join(''); | 684 .join(''); |
684 } | 685 } |
685 | 686 |
686 if (require.main === module) | 687 if (require.main === module) |
687 extractModule(); | 688 extractModule(); |
OLD | NEW |