Move mixed/lib/ to lib/ (#1382)
This commit is contained in:
parent
e9358997c0
commit
deed5027cd
@ -12,7 +12,7 @@
|
||||
},
|
||||
"plugins": ["no-unsanitized"],
|
||||
"ignorePatterns": [
|
||||
"/ext/mixed/lib/",
|
||||
"/ext/lib/",
|
||||
"/ext/bg/js/templates.js"
|
||||
],
|
||||
"rules": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"extends": "stylelint-config-recommended",
|
||||
"ignoreFiles": [
|
||||
"ext/mixed/lib/**/*.css"
|
||||
"ext/lib/**/*.css"
|
||||
],
|
||||
"rules": {
|
||||
"font-family-name-quotes": "always-where-recommended",
|
||||
|
@ -123,7 +123,7 @@
|
||||
"excludeFiles": [
|
||||
"sw.js",
|
||||
"bg/js/simple-dom-parser.js",
|
||||
"mixed/lib/parse5.js"
|
||||
"lib/parse5.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -148,7 +148,7 @@
|
||||
"excludeFiles": [
|
||||
"sw.js",
|
||||
"bg/js/simple-dom-parser.js",
|
||||
"mixed/lib/parse5.js"
|
||||
"lib/parse5.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -220,7 +220,7 @@
|
||||
"excludeFiles": [
|
||||
"sw.js",
|
||||
"bg/js/simple-dom-parser.js",
|
||||
"mixed/lib/parse5.js"
|
||||
"lib/parse5.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -256,7 +256,7 @@
|
||||
"excludeFiles": [
|
||||
"sw.js",
|
||||
"bg/js/simple-dom-parser.js",
|
||||
"mixed/lib/parse5.js"
|
||||
"lib/parse5.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ let JSZip = null;
|
||||
function getJSZip() {
|
||||
if (JSZip === null) {
|
||||
process.noDeprecation = true; // Suppress a warning about JSZip
|
||||
JSZip = require(path.join(__dirname, '../ext/mixed/lib/jszip.min.js'));
|
||||
JSZip = require(path.join(__dirname, '../ext/lib/jszip.min.js'));
|
||||
process.noDeprecation = false;
|
||||
}
|
||||
return JSZip;
|
||||
|
@ -15,7 +15,7 @@
|
||||
<body>
|
||||
<textarea id="clipboard-paste-target"></textarea>
|
||||
|
||||
<script src="/mixed/lib/wanakana.min.js"></script>
|
||||
<script src="/lib/wanakana.min.js"></script>
|
||||
|
||||
<script src="/mixed/js/core.js"></script>
|
||||
<script src="/mixed/js/yomichan.js"></script>
|
||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
@ -34,7 +34,7 @@
|
||||
</div></div>
|
||||
</div></div>
|
||||
|
||||
<script src="/mixed/lib/wanakana.min.js"></script>
|
||||
<script src="/lib/wanakana.min.js"></script>
|
||||
|
||||
<script src="/mixed/js/core.js"></script>
|
||||
<script src="/mixed/js/yomichan.js"></script>
|
||||
|
@ -73,7 +73,7 @@
|
||||
<div id="popup-menus"></div>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="/mixed/lib/wanakana.min.js"></script>
|
||||
<script src="/lib/wanakana.min.js"></script>
|
||||
|
||||
<script src="/mixed/js/core.js"></script>
|
||||
<script src="/mixed/js/yomichan.js"></script>
|
||||
|
@ -11,8 +11,8 @@
|
||||
<link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
|
||||
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
|
||||
<link rel="stylesheet" type="text/css" href="/mixed/lib/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/mixed/lib/bootstrap/css/bootstrap-theme.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/lib/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/lib/bootstrap/css/bootstrap-theme.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/css/settings.css">
|
||||
</head>
|
||||
<body>
|
||||
@ -1273,10 +1273,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/mixed/lib/jquery.min.js"></script>
|
||||
<script src="/mixed/lib/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/mixed/lib/jszip.min.js"></script>
|
||||
<script src="/mixed/lib/wanakana.min.js"></script>
|
||||
<script src="/lib/jquery.min.js"></script>
|
||||
<script src="/lib/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/lib/jszip.min.js"></script>
|
||||
<script src="/lib/wanakana.min.js"></script>
|
||||
|
||||
<script src="/mixed/js/core.js"></script>
|
||||
<script src="/mixed/js/yomichan.js"></script>
|
||||
|
@ -3186,8 +3186,8 @@
|
||||
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="/mixed/lib/jszip.min.js"></script>
|
||||
<script src="/mixed/lib/wanakana.min.js"></script>
|
||||
<script src="/lib/jszip.min.js"></script>
|
||||
<script src="/lib/wanakana.min.js"></script>
|
||||
|
||||
<script src="/mixed/js/core.js"></script>
|
||||
<script src="/mixed/js/yomichan.js"></script>
|
||||
|
@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
self.importScripts(
|
||||
'/mixed/lib/parse5.js',
|
||||
'/mixed/lib/wanakana.min.js',
|
||||
'/lib/parse5.js',
|
||||
'/lib/wanakana.min.js',
|
||||
'/mixed/js/core.js',
|
||||
'/mixed/js/yomichan.js',
|
||||
'/mixed/js/environment.js',
|
||||
|
@ -13,7 +13,7 @@
|
||||
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
|
||||
</head>
|
||||
<body>
|
||||
<script src="/mixed/lib/handlebars.min.js"></script>
|
||||
<script src="/lib/handlebars.min.js"></script>
|
||||
<script src="/mixed/js/dictionary-data-util.js"></script>
|
||||
<script src="/mixed/js/japanese.js"></script>
|
||||
<script src="/bg/js/anki-note-data.js"></script>
|
||||
|
@ -312,7 +312,7 @@
|
||||
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="/mixed/lib/jszip.min.js"></script>
|
||||
<script src="/lib/jszip.min.js"></script>
|
||||
|
||||
<script src="/mixed/js/core.js"></script>
|
||||
<script src="/mixed/js/yomichan.js"></script>
|
||||
|
@ -21,7 +21,7 @@ const {VM} = require('../dev/vm');
|
||||
|
||||
const vm = new VM();
|
||||
vm.execute([
|
||||
'mixed/lib/wanakana.min.js',
|
||||
'lib/wanakana.min.js',
|
||||
'mixed/js/japanese.js',
|
||||
'bg/js/text-source-map.js'
|
||||
]);
|
||||
|
@ -37,7 +37,7 @@ function getAllHtmlScriptPaths(fileName) {
|
||||
|
||||
function convertBackgroundScriptsToServiceWorkerScripts(scripts) {
|
||||
// Use parse5-based SimpleDOMParser
|
||||
scripts.splice(0, 0, '/mixed/lib/parse5.js');
|
||||
scripts.splice(0, 0, '/lib/parse5.js');
|
||||
const index = scripts.indexOf('/bg/js/native-simple-dom-parser.js');
|
||||
assert.ok(index >= 0);
|
||||
scripts[index] = '/bg/js/simple-dom-parser.js';
|
||||
@ -65,7 +65,7 @@ function main() {
|
||||
vm.assert.deepStrictEqual(scripts, importedScripts);
|
||||
|
||||
// Verify that eslint config lists files correctly
|
||||
const expectedSwRulesFiles = scripts.filter((src) => !src.startsWith('/mixed/lib/')).map((src) => `${extDirName}${src}`);
|
||||
const expectedSwRulesFiles = scripts.filter((src) => !src.startsWith('/lib/')).map((src) => `${extDirName}${src}`);
|
||||
const eslintConfig = JSON.parse(fs.readFileSync(path.join(rootDir, '.eslintrc.json'), {encoding: 'utf8'}));
|
||||
const swRules = eslintConfig.overrides.find((item) => (
|
||||
typeof item.env === 'object' &&
|
||||
|
Loading…
Reference in New Issue
Block a user