Convert remaining package.json scripts to cargo-make tasks.
This commit is contained in:
parent
862a2fdb86
commit
30c042f991
|
@ -25,6 +25,23 @@ clear = true
|
||||||
command = "pnpm"
|
command = "pnpm"
|
||||||
args = ["trash", "build/${BROWSER}"]
|
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.
|
# Re-build and pack the WebExtension for publishing.
|
||||||
[tasks.pack]
|
[tasks.pack]
|
||||||
clear = true
|
clear = true
|
||||||
|
@ -42,3 +59,9 @@ args = ["web-ext", "run", "--config=build/web-ext-${BROWSER}.json"]
|
||||||
[tasks.watch]
|
[tasks.watch]
|
||||||
env = { WATCH="true" }
|
env = { WATCH="true" }
|
||||||
extend = "build"
|
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"]
|
||||||
|
|
10
package.json
10
package.json
|
@ -1,16 +1,6 @@
|
||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"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": {
|
"dependencies": {
|
||||||
"@holllo/migration-helper": "^0.1.3",
|
"@holllo/migration-helper": "^0.1.3",
|
||||||
"@holllo/preact-components": "^0.2.3",
|
"@holllo/preact-components": "^0.2.3",
|
||||||
|
|
Loading…
Reference in New Issue