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:
toasted-nutbread 2021-02-14 11:19:54 -05:00 committed by GitHub
parent 43d1457ebf
commit e419a418f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 144 additions and 144 deletions

View File

@ -85,7 +85,7 @@
{ {
"files": [ "files": [
"ext/js/core.js", "ext/js/core.js",
"ext/bg/js/template-renderer.js", "ext/js/templates/template-renderer.js",
"ext/js/language/dictionary-data-util.js" "ext/js/language/dictionary-data-util.js"
], ],
"env": { "env": {
@ -96,8 +96,8 @@
"files": ["ext/**/*.js"], "files": ["ext/**/*.js"],
"excludedFiles": [ "excludedFiles": [
"ext/js/core.js", "ext/js/core.js",
"ext/bg/js/template-renderer.js", "ext/js/templates/template-renderer.js",
"ext/bg/js/anki-note-data.js", "ext/js/data/anki-note-data.js",
"ext/js/language/dictionary-data-util.js" "ext/js/language/dictionary-data-util.js"
], ],
"globals": { "globals": {
@ -165,26 +165,26 @@
"ext/js/general/cache-map.js", "ext/js/general/cache-map.js",
"ext/js/language/dictionary-data-util.js", "ext/js/language/dictionary-data-util.js",
"ext/js/general/object-property-accessor.js", "ext/js/general/object-property-accessor.js",
"ext/bg/js/anki.js", "ext/js/comm/anki.js",
"ext/bg/js/audio-downloader.js", "ext/js/media/audio-downloader.js",
"ext/bg/js/clipboard-monitor.js", "ext/js/comm/clipboard-monitor.js",
"ext/bg/js/clipboard-reader.js", "ext/js/comm/clipboard-reader.js",
"ext/bg/js/database.js", "ext/js/data/database.js",
"ext/bg/js/deinflector.js", "ext/js/language/deinflector.js",
"ext/bg/js/dictionary-database.js", "ext/js/language/dictionary-database.js",
"ext/bg/js/json-schema.js", "ext/js/data/json-schema.js",
"ext/bg/js/mecab.js", "ext/js/comm/mecab.js",
"ext/bg/js/media-utility.js", "ext/js/media/media-utility.js",
"ext/bg/js/options.js", "ext/js/data/options-util.js",
"ext/bg/js/permissions-util.js", "ext/js/data/permissions-util.js",
"ext/bg/js/profile-conditions.js", "ext/js/background/profile-conditions.js",
"ext/bg/js/request-builder.js", "ext/js/background/request-builder.js",
"ext/bg/js/simple-dom-parser.js", "ext/js/dom/simple-dom-parser.js",
"ext/bg/js/template-patcher.js", "ext/js/templates/template-patcher.js",
"ext/bg/js/text-source-map.js", "ext/js/general/text-source-map.js",
"ext/bg/js/translator.js", "ext/js/language/translator.js",
"ext/bg/js/backend.js", "ext/js/background/backend.js",
"ext/bg/js/background-main.js" "ext/js/background/background-main.js"
], ],
"env": { "env": {
"browser": false, "browser": false,

View File

@ -122,7 +122,7 @@
"fileName": "yomichan-chrome.zip", "fileName": "yomichan-chrome.zip",
"excludeFiles": [ "excludeFiles": [
"sw.js", "sw.js",
"bg/js/simple-dom-parser.js", "js/dom/simple-dom-parser.js",
"lib/parse5.js" "lib/parse5.js"
] ]
}, },
@ -147,7 +147,7 @@
], ],
"excludeFiles": [ "excludeFiles": [
"sw.js", "sw.js",
"bg/js/simple-dom-parser.js", "js/dom/simple-dom-parser.js",
"lib/parse5.js" "lib/parse5.js"
] ]
}, },
@ -175,7 +175,7 @@
], ],
"excludeFiles": [ "excludeFiles": [
"background.html", "background.html",
"bg/js/native-simple-dom-parser.js" "js/dom/native-simple-dom-parser.js"
] ]
}, },
{ {
@ -219,7 +219,7 @@
], ],
"excludeFiles": [ "excludeFiles": [
"sw.js", "sw.js",
"bg/js/simple-dom-parser.js", "js/dom/simple-dom-parser.js",
"lib/parse5.js" "lib/parse5.js"
] ]
}, },
@ -255,7 +255,7 @@
], ],
"excludeFiles": [ "excludeFiles": [
"sw.js", "sw.js",
"bg/js/simple-dom-parser.js", "js/dom/simple-dom-parser.js",
"lib/parse5.js" "lib/parse5.js"
] ]
} }

View File

@ -24,7 +24,7 @@ const vm = new VM();
vm.execute([ vm.execute([
'js/core.js', 'js/core.js',
'js/general/cache-map.js', 'js/general/cache-map.js',
'bg/js/json-schema.js' 'js/data/json-schema.js'
]); ]);
const JsonSchemaValidator = vm.get('JsonSchemaValidator'); const JsonSchemaValidator = vm.get('JsonSchemaValidator');

View File

@ -22,7 +22,7 @@ const vm = new VM();
vm.execute([ vm.execute([
'js/core.js', 'js/core.js',
'js/general/cache-map.js', 'js/general/cache-map.js',
'bg/js/json-schema.js' 'js/data/json-schema.js'
]); ]);
const JsonSchemaValidator = vm.get('JsonSchemaValidator'); const JsonSchemaValidator = vm.get('JsonSchemaValidator');

View File

@ -3,7 +3,7 @@
## Helpers ## Helpers
Yomichan supports several custom Handlebars helpers for rendering templates. 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` ### `dumpObject`

View File

@ -89,9 +89,9 @@
<script src="/js/input/hotkey-help-controller.js"></script> <script src="/js/input/hotkey-help-controller.js"></script>
<script src="/js/input/hotkey-util.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> </body>
</html> </html>

View File

@ -26,28 +26,28 @@
<script src="/js/language/dictionary-data-util.js"></script> <script src="/js/language/dictionary-data-util.js"></script>
<script src="/js/general/object-property-accessor.js"></script> <script src="/js/general/object-property-accessor.js"></script>
<script src="/bg/js/anki.js"></script> <script src="/js/comm/anki.js"></script>
<script src="/bg/js/audio-downloader.js"></script> <script src="/js/media/audio-downloader.js"></script>
<script src="/bg/js/clipboard-monitor.js"></script> <script src="/js/comm/clipboard-monitor.js"></script>
<script src="/bg/js/clipboard-reader.js"></script> <script src="/js/comm/clipboard-reader.js"></script>
<script src="/bg/js/database.js"></script> <script src="/js/data/database.js"></script>
<script src="/bg/js/deinflector.js"></script> <script src="/js/language/deinflector.js"></script>
<script src="/bg/js/dictionary-database.js"></script> <script src="/js/language/dictionary-database.js"></script>
<script src="/bg/js/json-schema.js"></script> <script src="/js/data/json-schema.js"></script>
<script src="/bg/js/mecab.js"></script> <script src="/js/comm/mecab.js"></script>
<script src="/bg/js/media-utility.js"></script> <script src="/js/media/media-utility.js"></script>
<script src="/bg/js/options.js"></script> <script src="/js/data/options-util.js"></script>
<script src="/bg/js/permissions-util.js"></script> <script src="/js/data/permissions-util.js"></script>
<script src="/bg/js/profile-conditions.js"></script> <script src="/js/background/profile-conditions.js"></script>
<script src="/bg/js/request-builder.js"></script> <script src="/js/background/request-builder.js"></script>
<script src="/bg/js/native-simple-dom-parser.js"></script> <script src="/js/dom/native-simple-dom-parser.js"></script>
<script src="/bg/js/template-patcher.js"></script> <script src="/js/templates/template-patcher.js"></script>
<script src="/bg/js/text-source-map.js"></script> <script src="/js/general/text-source-map.js"></script>
<script src="/bg/js/translator.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. Due to a Firefox bug, this next element is purposefully terminated incorrectly.

View File

@ -65,11 +65,11 @@
<script src="/js/dom/document-focus-controller.js"></script> <script src="/js/dom/document-focus-controller.js"></script>
<script src="/js/dom/html-template-collection.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/settings-controller.js"></script>
<script src="/js/settings/backup-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> </body>
</html> </html>

View File

@ -221,7 +221,7 @@ THE SOFTWARE.
<!-- Scripts --> <!-- Scripts -->
<script src="/js/dom/document-focus-controller.js"></script> <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> </body>
</html> </html>

View File

@ -168,11 +168,11 @@
<script src="/js/dom/document-focus-controller.js"></script> <script src="/js/dom/document-focus-controller.js"></script>
<script src="/js/dom/html-template-collection.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/permissions-toggle-controller.js"></script>
<script src="/js/settings/settings-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> </body>
</html> </html>

View File

@ -121,10 +121,10 @@
<script src="/js/dom/html-template-collection.js"></script> <script src="/js/dom/html-template-collection.js"></script>
<script src="/js/media/text-to-speech-audio.js"></script> <script src="/js/media/text-to-speech-audio.js"></script>
<script src="/bg/js/anki-note-builder.js"></script> <script src="/js/data/anki-note-builder.js"></script>
<script src="/bg/js/template-renderer-proxy.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> <script src="/js/display/popup-main.js"></script>

View File

@ -104,14 +104,14 @@
<script src="/js/dom/html-template-collection.js"></script> <script src="/js/dom/html-template-collection.js"></script>
<script src="/js/media/text-to-speech-audio.js"></script> <script src="/js/media/text-to-speech-audio.js"></script>
<script src="/bg/js/anki-note-builder.js"></script> <script src="/js/data/anki-note-builder.js"></script>
<script src="/bg/js/template-renderer-proxy.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="/bg/js/clipboard-monitor.js"></script> <script src="/js/comm/clipboard-monitor.js"></script>
<script src="/bg/js/search-display-controller.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> </body>
</html> </html>

View File

@ -1297,17 +1297,17 @@
<script src="/js/general/task-accumulator.js"></script> <script src="/js/general/task-accumulator.js"></script>
<script src="/js/media/text-to-speech-audio.js"></script> <script src="/js/media/text-to-speech-audio.js"></script>
<script src="/bg/js/anki.js"></script> <script src="/js/comm/anki.js"></script>
<script src="/bg/js/anki-note-builder.js"></script> <script src="/js/data/anki-note-builder.js"></script>
<script src="/bg/js/options.js"></script> <script src="/js/data/options-util.js"></script>
<script src="/bg/js/database.js"></script> <script src="/js/data/database.js"></script>
<script src="/bg/js/dictionary-database.js"></script> <script src="/js/language/dictionary-database.js"></script>
<script src="/bg/js/dictionary-importer.js"></script> <script src="/js/language/dictionary-importer.js"></script>
<script src="/bg/js/json-schema.js"></script> <script src="/js/data/json-schema.js"></script>
<script src="/bg/js/media-utility.js"></script> <script src="/js/media/media-utility.js"></script>
<script src="/bg/js/permissions-util.js"></script> <script src="/js/data/permissions-util.js"></script>
<script src="/bg/js/template-patcher.js"></script> <script src="/js/templates/template-patcher.js"></script>
<script src="/bg/js/template-renderer-proxy.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/keyboard-mouse-input-field.js"></script>
<script src="/js/settings/modal-jquery.js"></script> <script src="/js/settings/modal-jquery.js"></script>

View File

@ -3211,17 +3211,17 @@
<script src="/js/general/task-accumulator.js"></script> <script src="/js/general/task-accumulator.js"></script>
<script src="/js/media/text-to-speech-audio.js"></script> <script src="/js/media/text-to-speech-audio.js"></script>
<script src="/bg/js/anki.js"></script> <script src="/js/comm/anki.js"></script>
<script src="/bg/js/anki-note-builder.js"></script> <script src="/js/data/anki-note-builder.js"></script>
<script src="/bg/js/options.js"></script> <script src="/js/data/options-util.js"></script>
<script src="/bg/js/database.js"></script> <script src="/js/data/database.js"></script>
<script src="/bg/js/dictionary-database.js"></script> <script src="/js/language/dictionary-database.js"></script>
<script src="/bg/js/dictionary-importer.js"></script> <script src="/js/language/dictionary-importer.js"></script>
<script src="/bg/js/json-schema.js"></script> <script src="/js/data/json-schema.js"></script>
<script src="/bg/js/media-utility.js"></script> <script src="/js/media/media-utility.js"></script>
<script src="/bg/js/permissions-util.js"></script> <script src="/js/data/permissions-util.js"></script>
<script src="/bg/js/template-patcher.js"></script> <script src="/js/templates/template-patcher.js"></script>
<script src="/bg/js/template-renderer-proxy.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/keyboard-mouse-input-field.js"></script>
<script src="/js/settings/profile-conditions-ui.js"></script> <script src="/js/settings/profile-conditions-ui.js"></script>

View File

@ -25,24 +25,24 @@ self.importScripts(
'/js/general/cache-map.js', '/js/general/cache-map.js',
'/js/language/dictionary-data-util.js', '/js/language/dictionary-data-util.js',
'/js/general/object-property-accessor.js', '/js/general/object-property-accessor.js',
'/bg/js/anki.js', '/js/comm/anki.js',
'/bg/js/audio-downloader.js', '/js/media/audio-downloader.js',
'/bg/js/clipboard-monitor.js', '/js/comm/clipboard-monitor.js',
'/bg/js/clipboard-reader.js', '/js/comm/clipboard-reader.js',
'/bg/js/database.js', '/js/data/database.js',
'/bg/js/deinflector.js', '/js/language/deinflector.js',
'/bg/js/dictionary-database.js', '/js/language/dictionary-database.js',
'/bg/js/json-schema.js', '/js/data/json-schema.js',
'/bg/js/mecab.js', '/js/comm/mecab.js',
'/bg/js/media-utility.js', '/js/media/media-utility.js',
'/bg/js/options.js', '/js/data/options-util.js',
'/bg/js/permissions-util.js', '/js/data/permissions-util.js',
'/bg/js/profile-conditions.js', '/js/background/profile-conditions.js',
'/bg/js/request-builder.js', '/js/background/request-builder.js',
'/bg/js/simple-dom-parser.js', '/js/dom/simple-dom-parser.js',
'/bg/js/template-patcher.js', '/js/templates/template-patcher.js',
'/bg/js/text-source-map.js', '/js/general/text-source-map.js',
'/bg/js/translator.js', '/js/language/translator.js',
'/bg/js/backend.js', '/js/background/backend.js',
'/bg/js/background-main.js' '/js/background/background-main.js'
); );

View File

@ -16,9 +16,9 @@
<script src="/lib/handlebars.min.js"></script> <script src="/lib/handlebars.min.js"></script>
<script src="/js/language/dictionary-data-util.js"></script> <script src="/js/language/dictionary-data-util.js"></script>
<script src="/js/language/japanese-util.js"></script> <script src="/js/language/japanese-util.js"></script>
<script src="/bg/js/anki-note-data.js"></script> <script src="/js/data/anki-note-data.js"></script>
<script src="/bg/js/template-renderer.js"></script> <script src="/js/templates/template-renderer.js"></script>
<script src="/bg/js/template-renderer-frame-api.js"></script> <script src="/js/templates/template-renderer-frame-api.js"></script>
<script src="/bg/js/template-renderer-frame-main.js"></script> <script src="/js/templates/template-renderer-frame-main.js"></script>
</body> </body>
</html> </html>

View File

@ -331,12 +331,12 @@
<script src="/js/dom/selector-observer.js"></script> <script src="/js/dom/selector-observer.js"></script>
<script src="/js/general/task-accumulator.js"></script> <script src="/js/general/task-accumulator.js"></script>
<script src="/bg/js/database.js"></script> <script src="/js/data/database.js"></script>
<script src="/bg/js/dictionary-database.js"></script> <script src="/js/language/dictionary-database.js"></script>
<script src="/bg/js/dictionary-importer.js"></script> <script src="/js/language/dictionary-importer.js"></script>
<script src="/bg/js/json-schema.js"></script> <script src="/js/data/json-schema.js"></script>
<script src="/bg/js/media-utility.js"></script> <script src="/js/media/media-utility.js"></script>
<script src="/bg/js/permissions-util.js"></script> <script src="/js/data/permissions-util.js"></script>
<script src="/js/settings/dictionary-controller.js"></script> <script src="/js/settings/dictionary-controller.js"></script>
<script src="/js/settings/dictionary-import-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="/js/settings/settings-display-controller.js"></script>
<script src="/bg/js/welcome-main.js"></script> <script src="/js/pages/welcome-main.js"></script>
</body> </body>
</html> </html>

View File

@ -25,11 +25,11 @@ const vm = new DatabaseVM();
vm.execute([ vm.execute([
'js/core.js', 'js/core.js',
'js/general/cache-map.js', 'js/general/cache-map.js',
'bg/js/json-schema.js', 'js/data/json-schema.js',
'bg/js/media-utility.js', 'js/media/media-utility.js',
'bg/js/dictionary-importer.js', 'js/language/dictionary-importer.js',
'bg/js/database.js', 'js/data/database.js',
'bg/js/dictionary-database.js' 'js/language/dictionary-database.js'
]); ]);
const DictionaryImporter = vm.get('DictionaryImporter'); const DictionaryImporter = vm.get('DictionaryImporter');
const DictionaryDatabase = vm.get('DictionaryDatabase'); const DictionaryDatabase = vm.get('DictionaryDatabase');

View File

@ -881,7 +881,7 @@ function testDeinflections() {
]; ];
const vm = new VM(); const vm = new VM();
vm.execute(['bg/js/deinflector.js']); vm.execute(['js/language/deinflector.js']);
const [Deinflector] = vm.get(['Deinflector']); const [Deinflector] = vm.get(['Deinflector']);
const deinflectionReasions = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ext', 'data/deinflect.json'))); const deinflectionReasions = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ext', 'data/deinflect.json')));

View File

@ -23,7 +23,7 @@ const vm = new VM();
vm.execute([ vm.execute([
'lib/wanakana.min.js', 'lib/wanakana.min.js',
'js/language/japanese-util.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 [JapaneseUtil, TextSourceMap, wanakana] = vm.get(['JapaneseUtil', 'TextSourceMap', 'wanakana']);
const jp = new JapaneseUtil(wanakana); const jp = new JapaneseUtil(wanakana);

View File

@ -49,9 +49,9 @@ function createVM(extDir) {
vm.execute([ vm.execute([
'js/core.js', 'js/core.js',
'js/general/cache-map.js', 'js/general/cache-map.js',
'bg/js/json-schema.js', 'js/data/json-schema.js',
'bg/js/template-patcher.js', 'js/templates/template-patcher.js',
'bg/js/options.js' 'js/data/options-util.js'
]); ]);
return vm; return vm;

View File

@ -24,8 +24,8 @@ const vm = new VM({});
vm.execute([ vm.execute([
'js/core.js', 'js/core.js',
'js/general/cache-map.js', 'js/general/cache-map.js',
'bg/js/json-schema.js', 'js/data/json-schema.js',
'bg/js/profile-conditions.js' 'js/background/profile-conditions.js'
]); ]);
const [JsonSchemaValidator, ProfileConditions] = vm.get(['JsonSchemaValidator', 'ProfileConditions']); const [JsonSchemaValidator, ProfileConditions] = vm.get(['JsonSchemaValidator', 'ProfileConditions']);

View File

@ -23,7 +23,7 @@ const vm = new VM();
vm.execute([ vm.execute([
'js/core.js', 'js/core.js',
'js/general/cache-map.js', 'js/general/cache-map.js',
'bg/js/json-schema.js' 'js/data/json-schema.js'
]); ]);
const JsonSchemaValidator = vm.get('JsonSchemaValidator'); const JsonSchemaValidator = vm.get('JsonSchemaValidator');

View File

@ -38,9 +38,9 @@ function getAllHtmlScriptPaths(fileName) {
function convertBackgroundScriptsToServiceWorkerScripts(scripts) { function convertBackgroundScriptsToServiceWorkerScripts(scripts) {
// Use parse5-based SimpleDOMParser // Use parse5-based SimpleDOMParser
scripts.splice(0, 0, '/lib/parse5.js'); 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); assert.ok(index >= 0);
scripts[index] = '/bg/js/simple-dom-parser.js'; scripts[index] = '/js/dom/simple-dom-parser.js';
} }
function main() { function main() {

View File

@ -20,7 +20,7 @@ const {testMain} = require('../dev/util');
const {VM} = require('../dev/vm'); const {VM} = require('../dev/vm');
const vm = new 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'); const TextSourceMap = vm.get('TextSourceMap');

View File

@ -39,14 +39,14 @@ async function createVM() {
'js/core.js', 'js/core.js',
'js/general/cache-map.js', 'js/general/cache-map.js',
'js/language/japanese-util.js', 'js/language/japanese-util.js',
'bg/js/json-schema.js', 'js/data/json-schema.js',
'bg/js/media-utility.js', 'js/media/media-utility.js',
'bg/js/dictionary-importer.js', 'js/language/dictionary-importer.js',
'bg/js/database.js', 'js/data/database.js',
'bg/js/dictionary-database.js', 'js/language/dictionary-database.js',
'bg/js/text-source-map.js', 'js/general/text-source-map.js',
'bg/js/deinflector.js', 'js/language/deinflector.js',
'bg/js/translator.js' 'js/language/translator.js'
]); ]);
const [ const [
DictionaryImporter, DictionaryImporter,