Move the pnpm scripts to cargo-make tasks.
This commit is contained in:
parent
d49314c300
commit
fab90555dd
|
@ -0,0 +1,41 @@
|
|||
# Build the website.
|
||||
[tasks.build]
|
||||
clear = true
|
||||
command = "pnpm"
|
||||
args = ["vite", "build"]
|
||||
|
||||
# Remove build directories.
|
||||
[tasks.clean]
|
||||
clear = true
|
||||
command = "pnpm"
|
||||
args = ["trash", "public"]
|
||||
|
||||
# Deploy the website to Netlify.
|
||||
[tasks.deploy-netlify]
|
||||
clear = true
|
||||
command = "pnpm"
|
||||
dependencies = ["clean", "lint", "build"]
|
||||
args = ["netlify", "deploy", "-p", "-d", "build/", "-s", "holllo.org"]
|
||||
|
||||
# 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"]
|
||||
|
||||
# Start a development server and watch for changes.
|
||||
[tasks.watch]
|
||||
clear = true
|
||||
command = "pnpm"
|
||||
args = ["vite", "start"]
|
|
@ -1,12 +1,5 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
"build": "vite build",
|
||||
"deploy": "pnpm test && pnpm build -- --emptyOutDir && pnpm deploy:netlify",
|
||||
"deploy:netlify": "netlify deploy -p -d 'build' -s holllo.org",
|
||||
"test": "xo && stylelint 'source/**/*.scss' && tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource/inter": "^5.0.16",
|
||||
"js-base64": "^3.7.5",
|
||||
|
|
Loading…
Reference in New Issue