From 035450ae96ae3d4df6e5c347964f42227e84ece8 Mon Sep 17 00:00:00 2001 From: Maxx Crawford Date: Thu, 20 Oct 2022 09:29:26 -0500 Subject: [PATCH] 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 53958f1..e1dfee0 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",