diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 0000000..5fddf64 --- /dev/null +++ b/Makefile.toml @@ -0,0 +1,35 @@ +# Build the package. +[tasks.build] +dependencies = ["clean", "lint"] +clear = true +command = "pnpm" +args = ["tsc"] + +# Clean the build directory. +[tasks.clean] +clear = true +command = "pnpm" +args = ["trash", "build/"] + +# Run the full set of linting and testing. +[tasks.lint] +clear = true +dependencies = ["lint-js", "typecheck", "test"] + +# Lint the TypeScript using XO. +[tasks.lint-js] +clear = true +command = "pnpm" +args = ["xo"] + +# Run the tests. +[tasks.test] +clear = true +command = "pnpm" +args = ["tsx", "tests/migrate.test.ts"] + +# Do a typecheck with tsc. +[tasks.typecheck] +clear = true +command = "pnpm" +args = ["tsc", "--noEmit"] diff --git a/package.json b/package.json index b4007e7..ac94f7e 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,9 @@ "type": "git", "url": "https://git.bauke.xyz/Holllo/migration-helper" }, + "scripts": { + "prepublishOnly": "makers build" + }, "devDependencies": { "@holllo/test": "^0.2.1", "trash-cli": "^5.0.0",