1
Fork 0

Move the pnpm scripts to cargo-make tasks.

This commit is contained in:
Bauke 2024-01-17 12:21:43 +01:00
parent d49314c300
commit fab90555dd
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 41 additions and 7 deletions

41
Makefile.toml Normal file
View File

@ -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"]

View File

@ -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",