From d15262af63a84f8f41bcae4716fc1181acc00084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Poupard?= Date: Tue, 28 Feb 2023 12:04:43 +0100 Subject: [PATCH] chore(web-ext): run tasks should work fine --- package.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 956955ab..cd760dfa 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "author": "Orange SA", "config": { "author": "Orange SA", - "description": "Enhance user experience on web sites" + "description": "Enhance user experience on web sites", + "page": "https://www.orange.com/" }, "contributors": [ "Orange SA" @@ -54,13 +55,18 @@ "watch:img": "nodemon --watch src/img --watch src/WebExtension/img --ext png,gif,jpg --exec \"npm run build:img\"", "watch:js": "nodemon --watch src/js --ext js --exec \"npm run build:js\"", "watch:fonts": "nodemon --watch src/fonts --ext woff2 --exec \"npm run build:fonts\"", + "move:manifest:firefox": "shx cp dist/manifest.firefox.json dist/WebExtension/manifest.json", + "move:manifest:chrome": "shx cp dist/manifest.chrome.json dist/WebExtension/manifest.json", "zip": "npm run zip:firefox && npm run zip:chrome", - "prezip:firefox": "shx cp dist/manifest.firefox.json dist/WebExtension/manifest.json", + "prezip:firefox": "npm run move:manifest:firefox", "zip:firefox": "web-ext build -s dist/WebExtension -a ./ -n $npm_package_name-$npm_package_version-firefox.zip -o", - "prezip:chrome": "shx cp dist/manifest.chrome.json dist/WebExtension/manifest.json", + "prezip:chrome": "npm run move:manifest:chrome", "zip:chrome": "web-ext build -s dist/WebExtension -a ./ -n $npm_package_name-$npm_package_version-chrome.zip -o", "lint:ext": "web-ext lint -s $npm_package_name-$npm_package_version-firefox.zip", - "start:firefox": "web-ext run --source-dir ./dist/WebExtension --browser-console" + "preload:firefox": "npm run move:manifest:firefox", + "load:firefox": "web-ext run --source-dir ./dist/WebExtension --start-url=$npm_package_config_page --firefox-preview mv3 --browser-console", + "preload:chrome": "npm run move:manifest:chrome", + "load:chrome": "web-ext run --source-dir ./dist/WebExtension --start-url=$npm_package_config_page --target chromium --devtools" }, "devDependencies": { "autoprefixer": "^10.4.13",