diff --git a/Makefile.toml b/Makefile.toml index ab21fcb..465d0bc 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -25,6 +25,23 @@ clear = true command = "pnpm" args = ["trash", "build/${BROWSER}"] +# Run all other linting tasks. +[tasks.lint] +clear = true +dependencies = ["lint-js", "lint-scss"] + +# Run XO. +[tasks.lint-js] +clear = true +command = "pnpm" +args = ["xo"] + +# Run Stylelint. +[tasks.lint-scss] +clear = true +command = "pnpm" +args = ["stylelint", "source/**/*.scss"] + # Re-build and pack the WebExtension for publishing. [tasks.pack] clear = true @@ -42,3 +59,9 @@ args = ["web-ext", "run", "--config=build/web-ext-${BROWSER}.json"] [tasks.watch] env = { WATCH="true" } extend = "build" + +# Create a ZIP archive with only the source code, for AMO publishing. +[tasks.zip-source] +clear = true +command = "git" +args = ["archive", "--format=zip", "--output=build/queue-source.zip", "HEAD"] diff --git a/package.json b/package.json index 3e54ee7..837fd33 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,6 @@ { "private": true, "type": "module", - "scripts": { - "start": "vite build -m development --watch", - "start:chromium": "VITE_BROWSER=chromium pnpm start", - "clean": "trash build web-ext-artifacts", - "build": "pnpm clean && pnpm build:chromium && pnpm build:firefox && pnpm zip-source", - "build:chromium": "VITE_BROWSER=chromium vite build && web-ext build -n queue-chromium-{version}.zip -s build/chromium", - "build:firefox": "VITE_BROWSER=firefox vite build && web-ext build -n queue-firefox-{version}.zip -s build/firefox", - "zip-source": "git archive --format zip --output web-ext-artifacts/queue-source.zip HEAD", - "test": "xo && stylelint 'source/**/*.scss' && tsc && c8 ava" - }, "dependencies": { "@holllo/migration-helper": "^0.1.3", "@holllo/preact-components": "^0.2.3",