diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 0000000..c042ecc --- /dev/null +++ b/Makefile.toml @@ -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"] diff --git a/package.json b/package.json index 2763841..4a485da 100644 --- a/package.json +++ b/package.json @@ -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",