Skip to content

Commit

Permalink
Move assets/resources into src/js/
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Nov 27, 2024
1 parent adced29 commit 4d525f1
Show file tree
Hide file tree
Showing 17 changed files with 5 additions and 8 deletions.
6 changes: 1 addition & 5 deletions platform/mv3/make-scriptlets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/******************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/js/redirect-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion assets/resources/shared.js → src/js/resources/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions tools/copy-common-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion tools/make-mv3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 4d525f1

Please sign in to comment.