From 035450ae96ae3d4df6e5c347964f42227e84ece8 Mon Sep 17 00:00:00 2001 From: Maxx Crawford Date: Thu, 20 Oct 2022 09:29:26 -0500 Subject: [PATCH 1/2] Add remove/restore scripts for nested .git folder The /src/_locales/.github folder causes `web-ext run` to fail when running the npm dev script. This folder removal isn't tracked or surfaced during local dev work when working from the root directory. --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 53958f17..e1dfee03 100644 --- a/package.json +++ b/package.json @@ -36,13 +36,15 @@ "url": "git+https://github.com/mozilla/multi-account-containers.git" }, "scripts": { - "dev": "web-ext run -s src/", + "dev": "npm run remove-locales-github && web-ext run -s src/", "lint": "npm-run-all lint:*", "lint:addon": "./bin/addons-linter.sh", "lint:css": "stylelint src/css/*.css", "lint:html": "htmllint *.html", "lint:js": "eslint .", "package": "rm -rf src/web-ext-artifacts && npm run build && mv src/web-ext-artifacts/firefox_multi-account_containers-*.zip addon.xpi", + "restore-locales-github": "cd src/_locales && git restore .github/", + "remove-locales-github": "rm -rf src/_locales/.github", "test": "npm run lint && npm run coverage", "test:once": "mocha test/**/*.test.js", "test:watch": "npm run test:once -- --watch", From 7256456463b83f3fda4aa71326ce0e8cfde1159b Mon Sep 17 00:00:00 2001 From: Maxx Crawford Date: Thu, 20 Oct 2022 09:47:51 -0500 Subject: [PATCH 2/2] Add missing build script to package.json and ignore root build directory --- .gitignore | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index ff6bfab0..ebe52b1b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ README.html addon.env src/web-ext-artifacts/* +web-ext-artifacts # JetBrains IDE files .idea diff --git a/package.json b/package.json index e1dfee03..3b6541e0 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "url": "git+https://github.com/mozilla/multi-account-containers.git" }, "scripts": { + "build": "web-ext build -s src/", "dev": "npm run remove-locales-github && web-ext run -s src/", "lint": "npm-run-all lint:*", "lint:addon": "./bin/addons-linter.sh",