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'); |
(...skipping 22 matching lines...) Expand all Loading... |
33 */ | 33 */ |
34 const MODULES_TO_REMOVE = []; | 34 const MODULES_TO_REMOVE = []; |
35 | 35 |
36 /** | 36 /** |
37 * If moving to a new module: | 37 * If moving to a new module: |
38 * {file: 'common/Text.js', new: 'a_new_module'} | 38 * {file: 'common/Text.js', new: 'a_new_module'} |
39 * | 39 * |
40 * If moving to an existing module: | 40 * If moving to an existing module: |
41 * {file: 'ui/SomeFile.js', existing: 'common'} | 41 * {file: 'ui/SomeFile.js', existing: 'common'} |
42 */ | 42 */ |
43 const JS_FILES_MAPPING = | 43 const JS_FILES_MAPPING = [ |
44 [{file: 'common/FormatterWorkerPool.js', new: 'formatter'}, {file: 'sources/
ScriptFormatter.js', new: 'formatter'}]; | 44 {file: 'main/WarningErrorCounter.js', new: 'counters'}, |
| 45 ]; |
45 | 46 |
46 /** | 47 /** |
47 * List all new modules here: | 48 * List all new modules here: |
48 * mobile_throttling: { | 49 * mobile_throttling: { |
49 * dependencies: ['sdk'], | 50 * dependencies: ['sdk'], |
50 * dependents: ['console'], | 51 * dependents: ['console'], |
51 * applications: ['inspector.json'], | 52 * applications: ['inspector.json'], |
52 * autostart: false, | 53 * autostart: false, |
53 * } | 54 * } |
54 */ | 55 */ |
55 const MODULE_MAPPING = { | 56 const MODULE_MAPPING = { |
56 formatter: { | 57 counters: { |
57 dependencies: ['common'], | 58 dependencies: ['common', 'ui', 'console_model'], |
58 dependents: ['sources', 'audits', 'network', 'sass'], | 59 dependents: ['main'], |
59 applications: ['inspector.json'], | 60 applications: ['inspector.json'], |
60 autostart: false, | 61 autostart: true, |
61 }, | 62 }, |
62 }; | 63 }; |
63 | 64 |
64 /** | 65 /** |
65 * If an existing module will have a new dependency on an existing module: | 66 * If an existing module will have a new dependency on an existing module: |
66 * console: ['new_dependency'] | 67 * console: ['new_dependency'] |
67 */ | 68 */ |
68 const NEW_DEPENDENCIES_BY_EXISTING_MODULES = { | 69 const NEW_DEPENDENCIES_BY_EXISTING_MODULES = { |
69 // resources: ['components'], | 70 // resources: ['components'], |
70 }; | 71 }; |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 return string.split('') | 718 return string.split('') |
718 .map(function(char) { | 719 .map(function(char) { |
719 var charCode = char.charCodeAt(0); | 720 var charCode = char.charCodeAt(0); |
720 return charCode > 127 ? unicodeCharEscape(charCode) : char; | 721 return charCode > 127 ? unicodeCharEscape(charCode) : char; |
721 }) | 722 }) |
722 .join(''); | 723 .join(''); |
723 } | 724 } |
724 | 725 |
725 if (require.main === module) | 726 if (require.main === module) |
726 extractModule(); | 727 extractModule(); |
OLD | NEW |