Move bg/js (#1387)
* Move bg/js/anki.js to js/comm/anki.js * Move bg/js/mecab.js to js/comm/mecab.js * Move bg/js/search-main.js to js/display/search-main.js * Move bg/js/template-patcher.js to js/templates/template-patcher.js * Move bg/js/template-renderer-frame-api.js to js/templates/template-renderer-frame-api.js * Move bg/js/template-renderer-frame-main.js to js/templates/template-renderer-frame-main.js * Move bg/js/template-renderer-proxy.js to js/templates/template-renderer-proxy.js * Move bg/js/template-renderer.js to js/templates/template-renderer.js * Move bg/js/media-utility.js to js/media/media-utility.js * Move bg/js/native-simple-dom-parser.js to js/dom/native-simple-dom-parser.js * Move bg/js/simple-dom-parser.js to js/dom/simple-dom-parser.js * Move bg/js/audio-downloader.js to js/media/audio-downloader.js * Move bg/js/deinflector.js to js/language/deinflector.js * Move bg/js/backend.js to js/background/backend.js * Move bg/js/translator.js to js/language/translator.js * Move bg/js/search-display-controller.js to js/display/search-display-controller.js * Move bg/js/request-builder.js to js/background/request-builder.js * Move bg/js/text-source-map.js to js/general/text-source-map.js * Move bg/js/clipboard-reader.js to js/comm/clipboard-reader.js * Move bg/js/clipboard-monitor.js to js/comm/clipboard-monitor.js * Move bg/js/query-parser.js to js/display/query-parser.js * Move bg/js/profile-conditions.js to js/background/profile-conditions.js * Move bg/js/dictionary-database.js to js/language/dictionary-database.js * Move bg/js/dictionary-importer.js to js/language/dictionary-importer.js * Move bg/js/anki-note-builder.js to js/data/anki-note-builder.js * Move bg/js/anki-note-data.js to js/data/anki-note-data.js * Move bg/js/database.js to js/data/database.js * Move bg/js/json-schema.js to js/data/json-schema.js * Move bg/js/options.js to js/data/options-util.js * Move bg/js/background-main.js to js/background/background-main.js * Move bg/js/permissions-util.js to js/data/permissions-util.js * Move bg/js/context-main.js to js/pages/action-popup-main.js * Move bg/js/generic-page-main.js to js/pages/generic-page-main.js * Move bg/js/info-main.js to js/pages/info-main.js * Move bg/js/permissions-main.js to js/pages/permissions-main.js * Move bg/js/welcome-main.js to js/pages/welcome-main.js
This commit is contained in:
parent
43d1457ebf
commit
e419a418f6
@ -85,7 +85,7 @@
|
||||
{
|
||||
"files": [
|
||||
"ext/js/core.js",
|
||||
"ext/bg/js/template-renderer.js",
|
||||
"ext/js/templates/template-renderer.js",
|
||||
"ext/js/language/dictionary-data-util.js"
|
||||
],
|
||||
"env": {
|
||||
@ -96,8 +96,8 @@
|
||||
"files": ["ext/**/*.js"],
|
||||
"excludedFiles": [
|
||||
"ext/js/core.js",
|
||||
"ext/bg/js/template-renderer.js",
|
||||
"ext/bg/js/anki-note-data.js",
|
||||
"ext/js/templates/template-renderer.js",
|
||||
"ext/js/data/anki-note-data.js",
|
||||
"ext/js/language/dictionary-data-util.js"
|
||||
],
|
||||
"globals": {
|
||||
@ -165,26 +165,26 @@
|
||||
"ext/js/general/cache-map.js",
|
||||
"ext/js/language/dictionary-data-util.js",
|
||||
"ext/js/general/object-property-accessor.js",
|
||||
"ext/bg/js/anki.js",
|
||||
"ext/bg/js/audio-downloader.js",
|
||||
"ext/bg/js/clipboard-monitor.js",
|
||||
"ext/bg/js/clipboard-reader.js",
|
||||
"ext/bg/js/database.js",
|
||||
"ext/bg/js/deinflector.js",
|
||||
"ext/bg/js/dictionary-database.js",
|
||||
"ext/bg/js/json-schema.js",
|
||||
"ext/bg/js/mecab.js",
|
||||
"ext/bg/js/media-utility.js",
|
||||
"ext/bg/js/options.js",
|
||||
"ext/bg/js/permissions-util.js",
|
||||
"ext/bg/js/profile-conditions.js",
|
||||
"ext/bg/js/request-builder.js",
|
||||
"ext/bg/js/simple-dom-parser.js",
|
||||
"ext/bg/js/template-patcher.js",
|
||||
"ext/bg/js/text-source-map.js",
|
||||
"ext/bg/js/translator.js",
|
||||
"ext/bg/js/backend.js",
|
||||
"ext/bg/js/background-main.js"
|
||||
"ext/js/comm/anki.js",
|
||||
"ext/js/media/audio-downloader.js",
|
||||
"ext/js/comm/clipboard-monitor.js",
|
||||
"ext/js/comm/clipboard-reader.js",
|
||||
"ext/js/data/database.js",
|
||||
"ext/js/language/deinflector.js",
|
||||
"ext/js/language/dictionary-database.js",
|
||||
"ext/js/data/json-schema.js",
|
||||
"ext/js/comm/mecab.js",
|
||||
"ext/js/media/media-utility.js",
|
||||
"ext/js/data/options-util.js",
|
||||
"ext/js/data/permissions-util.js",
|
||||
"ext/js/background/profile-conditions.js",
|
||||
"ext/js/background/request-builder.js",
|
||||
"ext/js/dom/simple-dom-parser.js",
|
||||
"ext/js/templates/template-patcher.js",
|
||||
"ext/js/general/text-source-map.js",
|
||||
"ext/js/language/translator.js",
|
||||
"ext/js/background/backend.js",
|
||||
"ext/js/background/background-main.js"
|
||||
],
|
||||
"env": {
|
||||
"browser": false,
|
||||
|
@ -122,7 +122,7 @@
|
||||
"fileName": "yomichan-chrome.zip",
|
||||
"excludeFiles": [
|
||||
"sw.js",
|
||||
"bg/js/simple-dom-parser.js",
|
||||
"js/dom/simple-dom-parser.js",
|
||||
"lib/parse5.js"
|
||||
]
|
||||
},
|
||||
@ -147,7 +147,7 @@
|
||||
],
|
||||
"excludeFiles": [
|
||||
"sw.js",
|
||||
"bg/js/simple-dom-parser.js",
|
||||
"js/dom/simple-dom-parser.js",
|
||||
"lib/parse5.js"
|
||||
]
|
||||
},
|
||||
@ -175,7 +175,7 @@
|
||||
],
|
||||
"excludeFiles": [
|
||||
"background.html",
|
||||
"bg/js/native-simple-dom-parser.js"
|
||||
"js/dom/native-simple-dom-parser.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -219,7 +219,7 @@
|
||||
],
|
||||
"excludeFiles": [
|
||||
"sw.js",
|
||||
"bg/js/simple-dom-parser.js",
|
||||
"js/dom/simple-dom-parser.js",
|
||||
"lib/parse5.js"
|
||||
]
|
||||
},
|
||||
@ -255,7 +255,7 @@
|
||||
],
|
||||
"excludeFiles": [
|
||||
"sw.js",
|
||||
"bg/js/simple-dom-parser.js",
|
||||
"js/dom/simple-dom-parser.js",
|
||||
"lib/parse5.js"
|
||||
]
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ const vm = new VM();
|
||||
vm.execute([
|
||||
'js/core.js',
|
||||
'js/general/cache-map.js',
|
||||
'bg/js/json-schema.js'
|
||||
'js/data/json-schema.js'
|
||||
]);
|
||||
const JsonSchemaValidator = vm.get('JsonSchemaValidator');
|
||||
|
||||
|
@ -22,7 +22,7 @@ const vm = new VM();
|
||||
vm.execute([
|
||||
'js/core.js',
|
||||
'js/general/cache-map.js',
|
||||
'bg/js/json-schema.js'
|
||||
'js/data/json-schema.js'
|
||||
]);
|
||||
const JsonSchemaValidator = vm.get('JsonSchemaValidator');
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
## Helpers
|
||||
|
||||
Yomichan supports several custom Handlebars helpers for rendering templates.
|
||||
The source code for these templates can be found [here](../ext/bg/js/template-renderer.js).
|
||||
The source code for these templates can be found [here](../ext/js/templates/template-renderer.js).
|
||||
|
||||
|
||||
### `dumpObject`
|
||||
|
@ -89,9 +89,9 @@
|
||||
<script src="/js/input/hotkey-help-controller.js"></script>
|
||||
<script src="/js/input/hotkey-util.js"></script>
|
||||
|
||||
<script src="/bg/js/permissions-util.js"></script>
|
||||
<script src="/js/data/permissions-util.js"></script>
|
||||
|
||||
<script src="/bg/js/context-main.js"></script>
|
||||
<script src="/js/pages/action-popup-main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -26,28 +26,28 @@
|
||||
<script src="/js/language/dictionary-data-util.js"></script>
|
||||
<script src="/js/general/object-property-accessor.js"></script>
|
||||
|
||||
<script src="/bg/js/anki.js"></script>
|
||||
<script src="/bg/js/audio-downloader.js"></script>
|
||||
<script src="/bg/js/clipboard-monitor.js"></script>
|
||||
<script src="/bg/js/clipboard-reader.js"></script>
|
||||
<script src="/bg/js/database.js"></script>
|
||||
<script src="/bg/js/deinflector.js"></script>
|
||||
<script src="/bg/js/dictionary-database.js"></script>
|
||||
<script src="/bg/js/json-schema.js"></script>
|
||||
<script src="/bg/js/mecab.js"></script>
|
||||
<script src="/bg/js/media-utility.js"></script>
|
||||
<script src="/bg/js/options.js"></script>
|
||||
<script src="/bg/js/permissions-util.js"></script>
|
||||
<script src="/bg/js/profile-conditions.js"></script>
|
||||
<script src="/bg/js/request-builder.js"></script>
|
||||
<script src="/bg/js/native-simple-dom-parser.js"></script>
|
||||
<script src="/bg/js/template-patcher.js"></script>
|
||||
<script src="/bg/js/text-source-map.js"></script>
|
||||
<script src="/bg/js/translator.js"></script>
|
||||
<script src="/js/comm/anki.js"></script>
|
||||
<script src="/js/media/audio-downloader.js"></script>
|
||||
<script src="/js/comm/clipboard-monitor.js"></script>
|
||||
<script src="/js/comm/clipboard-reader.js"></script>
|
||||
<script src="/js/data/database.js"></script>
|
||||
<script src="/js/language/deinflector.js"></script>
|
||||
<script src="/js/language/dictionary-database.js"></script>
|
||||
<script src="/js/data/json-schema.js"></script>
|
||||
<script src="/js/comm/mecab.js"></script>
|
||||
<script src="/js/media/media-utility.js"></script>
|
||||
<script src="/js/data/options-util.js"></script>
|
||||
<script src="/js/data/permissions-util.js"></script>
|
||||
<script src="/js/background/profile-conditions.js"></script>
|
||||
<script src="/js/background/request-builder.js"></script>
|
||||
<script src="/js/dom/native-simple-dom-parser.js"></script>
|
||||
<script src="/js/templates/template-patcher.js"></script>
|
||||
<script src="/js/general/text-source-map.js"></script>
|
||||
<script src="/js/language/translator.js"></script>
|
||||
|
||||
<script src="/bg/js/backend.js"></script>
|
||||
<script src="/js/background/backend.js"></script>
|
||||
|
||||
<script src="/bg/js/background-main.js"></script>
|
||||
<script src="/js/background/background-main.js"></script>
|
||||
|
||||
<!--
|
||||
Due to a Firefox bug, this next element is purposefully terminated incorrectly.
|
||||
|
@ -65,11 +65,11 @@
|
||||
|
||||
<script src="/js/dom/document-focus-controller.js"></script>
|
||||
<script src="/js/dom/html-template-collection.js"></script>
|
||||
<script src="/bg/js/permissions-util.js"></script>
|
||||
<script src="/js/data/permissions-util.js"></script>
|
||||
<script src="/js/settings/settings-controller.js"></script>
|
||||
<script src="/js/settings/backup-controller.js"></script>
|
||||
|
||||
<script src="/bg/js/info-main.js"></script>
|
||||
<script src="/js/pages/info-main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -221,7 +221,7 @@ THE SOFTWARE.
|
||||
<!-- Scripts -->
|
||||
<script src="/js/dom/document-focus-controller.js"></script>
|
||||
|
||||
<script src="/bg/js/generic-page-main.js"></script>
|
||||
<script src="/js/pages/generic-page-main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -168,11 +168,11 @@
|
||||
|
||||
<script src="/js/dom/document-focus-controller.js"></script>
|
||||
<script src="/js/dom/html-template-collection.js"></script>
|
||||
<script src="/bg/js/permissions-util.js"></script>
|
||||
<script src="/js/data/permissions-util.js"></script>
|
||||
<script src="/js/settings/permissions-toggle-controller.js"></script>
|
||||
<script src="/js/settings/settings-controller.js"></script>
|
||||
|
||||
<script src="/bg/js/permissions-main.js"></script>
|
||||
<script src="/js/pages/permissions-main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -121,10 +121,10 @@
|
||||
<script src="/js/dom/html-template-collection.js"></script>
|
||||
<script src="/js/media/text-to-speech-audio.js"></script>
|
||||
|
||||
<script src="/bg/js/anki-note-builder.js"></script>
|
||||
<script src="/bg/js/template-renderer-proxy.js"></script>
|
||||
<script src="/js/data/anki-note-builder.js"></script>
|
||||
<script src="/js/templates/template-renderer-proxy.js"></script>
|
||||
|
||||
<script src="/bg/js/query-parser.js"></script>
|
||||
<script src="/js/display/query-parser.js"></script>
|
||||
|
||||
<script src="/js/display/popup-main.js"></script>
|
||||
|
||||
|
@ -104,14 +104,14 @@
|
||||
<script src="/js/dom/html-template-collection.js"></script>
|
||||
<script src="/js/media/text-to-speech-audio.js"></script>
|
||||
|
||||
<script src="/bg/js/anki-note-builder.js"></script>
|
||||
<script src="/bg/js/template-renderer-proxy.js"></script>
|
||||
<script src="/js/data/anki-note-builder.js"></script>
|
||||
<script src="/js/templates/template-renderer-proxy.js"></script>
|
||||
|
||||
<script src="/bg/js/query-parser.js"></script>
|
||||
<script src="/bg/js/clipboard-monitor.js"></script>
|
||||
<script src="/bg/js/search-display-controller.js"></script>
|
||||
<script src="/js/display/query-parser.js"></script>
|
||||
<script src="/js/comm/clipboard-monitor.js"></script>
|
||||
<script src="/js/display/search-display-controller.js"></script>
|
||||
|
||||
<script src="/bg/js/search-main.js"></script>
|
||||
<script src="/js/display/search-main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1297,17 +1297,17 @@
|
||||
<script src="/js/general/task-accumulator.js"></script>
|
||||
<script src="/js/media/text-to-speech-audio.js"></script>
|
||||
|
||||
<script src="/bg/js/anki.js"></script>
|
||||
<script src="/bg/js/anki-note-builder.js"></script>
|
||||
<script src="/bg/js/options.js"></script>
|
||||
<script src="/bg/js/database.js"></script>
|
||||
<script src="/bg/js/dictionary-database.js"></script>
|
||||
<script src="/bg/js/dictionary-importer.js"></script>
|
||||
<script src="/bg/js/json-schema.js"></script>
|
||||
<script src="/bg/js/media-utility.js"></script>
|
||||
<script src="/bg/js/permissions-util.js"></script>
|
||||
<script src="/bg/js/template-patcher.js"></script>
|
||||
<script src="/bg/js/template-renderer-proxy.js"></script>
|
||||
<script src="/js/comm/anki.js"></script>
|
||||
<script src="/js/data/anki-note-builder.js"></script>
|
||||
<script src="/js/data/options-util.js"></script>
|
||||
<script src="/js/data/database.js"></script>
|
||||
<script src="/js/language/dictionary-database.js"></script>
|
||||
<script src="/js/language/dictionary-importer.js"></script>
|
||||
<script src="/js/data/json-schema.js"></script>
|
||||
<script src="/js/media/media-utility.js"></script>
|
||||
<script src="/js/data/permissions-util.js"></script>
|
||||
<script src="/js/templates/template-patcher.js"></script>
|
||||
<script src="/js/templates/template-renderer-proxy.js"></script>
|
||||
|
||||
<script src="/js/settings/keyboard-mouse-input-field.js"></script>
|
||||
<script src="/js/settings/modal-jquery.js"></script>
|
||||
|
@ -3211,17 +3211,17 @@
|
||||
<script src="/js/general/task-accumulator.js"></script>
|
||||
<script src="/js/media/text-to-speech-audio.js"></script>
|
||||
|
||||
<script src="/bg/js/anki.js"></script>
|
||||
<script src="/bg/js/anki-note-builder.js"></script>
|
||||
<script src="/bg/js/options.js"></script>
|
||||
<script src="/bg/js/database.js"></script>
|
||||
<script src="/bg/js/dictionary-database.js"></script>
|
||||
<script src="/bg/js/dictionary-importer.js"></script>
|
||||
<script src="/bg/js/json-schema.js"></script>
|
||||
<script src="/bg/js/media-utility.js"></script>
|
||||
<script src="/bg/js/permissions-util.js"></script>
|
||||
<script src="/bg/js/template-patcher.js"></script>
|
||||
<script src="/bg/js/template-renderer-proxy.js"></script>
|
||||
<script src="/js/comm/anki.js"></script>
|
||||
<script src="/js/data/anki-note-builder.js"></script>
|
||||
<script src="/js/data/options-util.js"></script>
|
||||
<script src="/js/data/database.js"></script>
|
||||
<script src="/js/language/dictionary-database.js"></script>
|
||||
<script src="/js/language/dictionary-importer.js"></script>
|
||||
<script src="/js/data/json-schema.js"></script>
|
||||
<script src="/js/media/media-utility.js"></script>
|
||||
<script src="/js/data/permissions-util.js"></script>
|
||||
<script src="/js/templates/template-patcher.js"></script>
|
||||
<script src="/js/templates/template-renderer-proxy.js"></script>
|
||||
|
||||
<script src="/js/settings/keyboard-mouse-input-field.js"></script>
|
||||
<script src="/js/settings/profile-conditions-ui.js"></script>
|
||||
|
40
ext/sw.js
40
ext/sw.js
@ -25,24 +25,24 @@ self.importScripts(
|
||||
'/js/general/cache-map.js',
|
||||
'/js/language/dictionary-data-util.js',
|
||||
'/js/general/object-property-accessor.js',
|
||||
'/bg/js/anki.js',
|
||||
'/bg/js/audio-downloader.js',
|
||||
'/bg/js/clipboard-monitor.js',
|
||||
'/bg/js/clipboard-reader.js',
|
||||
'/bg/js/database.js',
|
||||
'/bg/js/deinflector.js',
|
||||
'/bg/js/dictionary-database.js',
|
||||
'/bg/js/json-schema.js',
|
||||
'/bg/js/mecab.js',
|
||||
'/bg/js/media-utility.js',
|
||||
'/bg/js/options.js',
|
||||
'/bg/js/permissions-util.js',
|
||||
'/bg/js/profile-conditions.js',
|
||||
'/bg/js/request-builder.js',
|
||||
'/bg/js/simple-dom-parser.js',
|
||||
'/bg/js/template-patcher.js',
|
||||
'/bg/js/text-source-map.js',
|
||||
'/bg/js/translator.js',
|
||||
'/bg/js/backend.js',
|
||||
'/bg/js/background-main.js'
|
||||
'/js/comm/anki.js',
|
||||
'/js/media/audio-downloader.js',
|
||||
'/js/comm/clipboard-monitor.js',
|
||||
'/js/comm/clipboard-reader.js',
|
||||
'/js/data/database.js',
|
||||
'/js/language/deinflector.js',
|
||||
'/js/language/dictionary-database.js',
|
||||
'/js/data/json-schema.js',
|
||||
'/js/comm/mecab.js',
|
||||
'/js/media/media-utility.js',
|
||||
'/js/data/options-util.js',
|
||||
'/js/data/permissions-util.js',
|
||||
'/js/background/profile-conditions.js',
|
||||
'/js/background/request-builder.js',
|
||||
'/js/dom/simple-dom-parser.js',
|
||||
'/js/templates/template-patcher.js',
|
||||
'/js/general/text-source-map.js',
|
||||
'/js/language/translator.js',
|
||||
'/js/background/backend.js',
|
||||
'/js/background/background-main.js'
|
||||
);
|
||||
|
@ -16,9 +16,9 @@
|
||||
<script src="/lib/handlebars.min.js"></script>
|
||||
<script src="/js/language/dictionary-data-util.js"></script>
|
||||
<script src="/js/language/japanese-util.js"></script>
|
||||
<script src="/bg/js/anki-note-data.js"></script>
|
||||
<script src="/bg/js/template-renderer.js"></script>
|
||||
<script src="/bg/js/template-renderer-frame-api.js"></script>
|
||||
<script src="/bg/js/template-renderer-frame-main.js"></script>
|
||||
<script src="/js/data/anki-note-data.js"></script>
|
||||
<script src="/js/templates/template-renderer.js"></script>
|
||||
<script src="/js/templates/template-renderer-frame-api.js"></script>
|
||||
<script src="/js/templates/template-renderer-frame-main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -331,12 +331,12 @@
|
||||
<script src="/js/dom/selector-observer.js"></script>
|
||||
<script src="/js/general/task-accumulator.js"></script>
|
||||
|
||||
<script src="/bg/js/database.js"></script>
|
||||
<script src="/bg/js/dictionary-database.js"></script>
|
||||
<script src="/bg/js/dictionary-importer.js"></script>
|
||||
<script src="/bg/js/json-schema.js"></script>
|
||||
<script src="/bg/js/media-utility.js"></script>
|
||||
<script src="/bg/js/permissions-util.js"></script>
|
||||
<script src="/js/data/database.js"></script>
|
||||
<script src="/js/language/dictionary-database.js"></script>
|
||||
<script src="/js/language/dictionary-importer.js"></script>
|
||||
<script src="/js/data/json-schema.js"></script>
|
||||
<script src="/js/media/media-utility.js"></script>
|
||||
<script src="/js/data/permissions-util.js"></script>
|
||||
|
||||
<script src="/js/settings/dictionary-controller.js"></script>
|
||||
<script src="/js/settings/dictionary-import-controller.js"></script>
|
||||
@ -349,7 +349,7 @@
|
||||
|
||||
<script src="/js/settings/settings-display-controller.js"></script>
|
||||
|
||||
<script src="/bg/js/welcome-main.js"></script>
|
||||
<script src="/js/pages/welcome-main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -25,11 +25,11 @@ const vm = new DatabaseVM();
|
||||
vm.execute([
|
||||
'js/core.js',
|
||||
'js/general/cache-map.js',
|
||||
'bg/js/json-schema.js',
|
||||
'bg/js/media-utility.js',
|
||||
'bg/js/dictionary-importer.js',
|
||||
'bg/js/database.js',
|
||||
'bg/js/dictionary-database.js'
|
||||
'js/data/json-schema.js',
|
||||
'js/media/media-utility.js',
|
||||
'js/language/dictionary-importer.js',
|
||||
'js/data/database.js',
|
||||
'js/language/dictionary-database.js'
|
||||
]);
|
||||
const DictionaryImporter = vm.get('DictionaryImporter');
|
||||
const DictionaryDatabase = vm.get('DictionaryDatabase');
|
||||
|
@ -881,7 +881,7 @@ function testDeinflections() {
|
||||
];
|
||||
|
||||
const vm = new VM();
|
||||
vm.execute(['bg/js/deinflector.js']);
|
||||
vm.execute(['js/language/deinflector.js']);
|
||||
const [Deinflector] = vm.get(['Deinflector']);
|
||||
|
||||
const deinflectionReasions = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ext', 'data/deinflect.json')));
|
||||
|
@ -23,7 +23,7 @@ const vm = new VM();
|
||||
vm.execute([
|
||||
'lib/wanakana.min.js',
|
||||
'js/language/japanese-util.js',
|
||||
'bg/js/text-source-map.js'
|
||||
'js/general/text-source-map.js'
|
||||
]);
|
||||
const [JapaneseUtil, TextSourceMap, wanakana] = vm.get(['JapaneseUtil', 'TextSourceMap', 'wanakana']);
|
||||
const jp = new JapaneseUtil(wanakana);
|
||||
|
@ -49,9 +49,9 @@ function createVM(extDir) {
|
||||
vm.execute([
|
||||
'js/core.js',
|
||||
'js/general/cache-map.js',
|
||||
'bg/js/json-schema.js',
|
||||
'bg/js/template-patcher.js',
|
||||
'bg/js/options.js'
|
||||
'js/data/json-schema.js',
|
||||
'js/templates/template-patcher.js',
|
||||
'js/data/options-util.js'
|
||||
]);
|
||||
|
||||
return vm;
|
||||
|
@ -24,8 +24,8 @@ const vm = new VM({});
|
||||
vm.execute([
|
||||
'js/core.js',
|
||||
'js/general/cache-map.js',
|
||||
'bg/js/json-schema.js',
|
||||
'bg/js/profile-conditions.js'
|
||||
'js/data/json-schema.js',
|
||||
'js/background/profile-conditions.js'
|
||||
]);
|
||||
const [JsonSchemaValidator, ProfileConditions] = vm.get(['JsonSchemaValidator', 'ProfileConditions']);
|
||||
|
||||
|
@ -23,7 +23,7 @@ const vm = new VM();
|
||||
vm.execute([
|
||||
'js/core.js',
|
||||
'js/general/cache-map.js',
|
||||
'bg/js/json-schema.js'
|
||||
'js/data/json-schema.js'
|
||||
]);
|
||||
const JsonSchemaValidator = vm.get('JsonSchemaValidator');
|
||||
|
||||
|
@ -38,9 +38,9 @@ function getAllHtmlScriptPaths(fileName) {
|
||||
function convertBackgroundScriptsToServiceWorkerScripts(scripts) {
|
||||
// Use parse5-based SimpleDOMParser
|
||||
scripts.splice(0, 0, '/lib/parse5.js');
|
||||
const index = scripts.indexOf('/bg/js/native-simple-dom-parser.js');
|
||||
const index = scripts.indexOf('/js/dom/native-simple-dom-parser.js');
|
||||
assert.ok(index >= 0);
|
||||
scripts[index] = '/bg/js/simple-dom-parser.js';
|
||||
scripts[index] = '/js/dom/simple-dom-parser.js';
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
@ -20,7 +20,7 @@ const {testMain} = require('../dev/util');
|
||||
const {VM} = require('../dev/vm');
|
||||
|
||||
const vm = new VM();
|
||||
vm.execute(['bg/js/text-source-map.js']);
|
||||
vm.execute(['js/general/text-source-map.js']);
|
||||
const TextSourceMap = vm.get('TextSourceMap');
|
||||
|
||||
|
||||
|
@ -39,14 +39,14 @@ async function createVM() {
|
||||
'js/core.js',
|
||||
'js/general/cache-map.js',
|
||||
'js/language/japanese-util.js',
|
||||
'bg/js/json-schema.js',
|
||||
'bg/js/media-utility.js',
|
||||
'bg/js/dictionary-importer.js',
|
||||
'bg/js/database.js',
|
||||
'bg/js/dictionary-database.js',
|
||||
'bg/js/text-source-map.js',
|
||||
'bg/js/deinflector.js',
|
||||
'bg/js/translator.js'
|
||||
'js/data/json-schema.js',
|
||||
'js/media/media-utility.js',
|
||||
'js/language/dictionary-importer.js',
|
||||
'js/data/database.js',
|
||||
'js/language/dictionary-database.js',
|
||||
'js/general/text-source-map.js',
|
||||
'js/language/deinflector.js',
|
||||
'js/language/translator.js'
|
||||
]);
|
||||
const [
|
||||
DictionaryImporter,
|
||||
|
Loading…
Reference in New Issue
Block a user