From e419a418f6f03ef0a24330b67e7b76c5e3a7c22d Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 14 Feb 2021 11:19:54 -0500 Subject: 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 --- test/test-database.js | 10 +++++----- test/test-deinflector.js | 2 +- test/test-japanese.js | 2 +- test/test-options-util.js | 6 +++--- test/test-profile-conditions.js | 4 ++-- test/test-schema.js | 2 +- test/test-sw.js | 4 ++-- test/test-text-source-map.js | 2 +- test/test-translator.js | 16 ++++++++-------- 9 files changed, 24 insertions(+), 24 deletions(-) (limited to 'test') diff --git a/test/test-database.js b/test/test-database.js index 8b075fd4..ae827318 100644 --- a/test/test-database.js +++ b/test/test-database.js @@ -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'); diff --git a/test/test-deinflector.js b/test/test-deinflector.js index dbc1f7e2..a5d6c06f 100644 --- a/test/test-deinflector.js +++ b/test/test-deinflector.js @@ -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'))); diff --git a/test/test-japanese.js b/test/test-japanese.js index e2be2315..590d3157 100644 --- a/test/test-japanese.js +++ b/test/test-japanese.js @@ -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); diff --git a/test/test-options-util.js b/test/test-options-util.js index 3e3f93bc..20b1f3f4 100644 --- a/test/test-options-util.js +++ b/test/test-options-util.js @@ -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; diff --git a/test/test-profile-conditions.js b/test/test-profile-conditions.js index 7ceda8c4..e1e6a72c 100644 --- a/test/test-profile-conditions.js +++ b/test/test-profile-conditions.js @@ -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']); diff --git a/test/test-schema.js b/test/test-schema.js index 2c48f5f5..7a1ea9bc 100644 --- a/test/test-schema.js +++ b/test/test-schema.js @@ -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'); diff --git a/test/test-sw.js b/test/test-sw.js index 803bb0c2..498a0a32 100644 --- a/test/test-sw.js +++ b/test/test-sw.js @@ -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() { diff --git a/test/test-text-source-map.js b/test/test-text-source-map.js index 68bb97b0..9f0c17bd 100644 --- a/test/test-text-source-map.js +++ b/test/test-text-source-map.js @@ -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'); diff --git a/test/test-translator.js b/test/test-translator.js index e1161a15..2d7b6baa 100644 --- a/test/test-translator.js +++ b/test/test-translator.js @@ -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, -- cgit v1.2.3