From 5e4f09ac9bffc8dfec77621cbeec9c80d3d22b9c Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 25 May 2023 12:38:17 +0200 Subject: [PATCH] Add the cargo-make file. --- Makefile.toml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Makefile.toml diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 0000000..fbd6daf --- /dev/null +++ b/Makefile.toml @@ -0,0 +1,40 @@ +[env] +# Set NODE_ENV="development" if not already defined. +# Either "development" or "production" should be used. +NODE_ENV = { condition = { env_not_set = ["NODE_ENV"] }, value = "development" } + +# Build the website. +[tasks.build] +clear = true +command = "pnpm" +args = ["tsx", "source/build.ts"] + +# Remove the build directory. +[tasks.clean] +clear = true +command = "pnpm" +args = ["trash", "build/"] + +# 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"] + +# Build and publish the website. +[tasks.publish] +clear = true +dependencies = ["clean", "build"] +command = "pnpm" +args = ["netlify", "deploy", "-p", "-d", "build/", "-s", "today.bauke.xyz"]