Move `assets/resources` into `src/js/`

This commit is contained in:
Raymond Hill 2024-11-27 16:47:11 -05:00
parent adced29b5b
commit 4d525f1a55
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
17 changed files with 5 additions and 8 deletions

View File

@ -19,12 +19,8 @@
Home: https://github.com/gorhill/uBlock
*/
'use strict';
/******************************************************************************/
import { builtinScriptlets } from './resources/scriptlets.js';
import fs from 'fs/promises';
import { builtinScriptlets } from './scriptlets.js';
import { safeReplace } from './safe-replace.js';
/******************************************************************************/

View File

@ -316,7 +316,7 @@ class RedirectEngine {
this.aliases = new Map();
const fetches = [
import('/assets/resources/scriptlets.js').then(module => {
import('/js/resources/scriptlets.js').then(module => {
for ( const scriptlet of module.builtinScriptlets ) {
const details = {};
details.mime = mimeFromName(scriptlet.name);

View File

@ -21,7 +21,7 @@
*/
// Code imported from main code base and exposed as injectable scriptlets
import { ArglistParser } from '../../js/arglist-parser.js';
import { ArglistParser } from '../arglist-parser.js';
import { registerScriptlet } from './base.js';

View File

@ -12,6 +12,7 @@ cp -R src/css $DES/
cp -R src/img $DES/
mkdir $DES/js
cp -R src/js/*.js $DES/js/
cp -R src/js/resources $DES/js/
cp -R src/js/codemirror $DES/js/
cp -R src/js/scriptlets $DES/js/
cp -R src/js/wasm $DES/js/

View File

@ -109,7 +109,7 @@ if [ "$QUICK" != "yes" ]; then
cp platform/mv3/*.mjs "$TMPDIR"/
cp platform/mv3/extension/js/utils.js "$TMPDIR"/js/
cp "$UBO_DIR"/assets/assets.dev.json "$TMPDIR"/
cp "$UBO_DIR"/assets/resources/*.js "$TMPDIR"/
cp -R "$UBO_DIR"/src/js/resources "$TMPDIR"/
cp -R platform/mv3/scriptlets "$TMPDIR"/
mkdir -p "$TMPDIR"/web_accessible_resources
cp "$UBO_DIR"/src/web_accessible_resources/* "$TMPDIR"/web_accessible_resources/