The following guide will get you up and running as quickly as possible, while also teaching you the fundamentals of setup.ts
First we create our project directory and initialize a new project inside
mkdir setup-starter
cd setup-starter
pnpm initNext we will install setup.ts as a dev-dependency.
pnpm install -D @setup.ts/setup@setup.ts/setup ships with a useful CLI tool.
You can access it via pnpm setup.ts ... or npx setup.ts ... when using NPM.
There are two commands you should know:
setup.ts file with the content of package.jsonsetup.ts file into a package.json file while applying all plugins etc.In your project directory run:
pnpm setup.ts generateThis will create a setup.ts file in your project directory with the contents of your package.json file.
You should see that a setup.ts file has been created that should look something like this
import { defineSetup } from "@setup.ts/setup";
export default defineSetup({
name: "setup-starter",
version: "1.0.0",
description: "",
main: "index.js",
scripts: {
test: 'echo "Error: no test specified" && exit 1',
},
keywords: [],
author: "",
license: "ISC",
dependencies: {
"@setup.ts/setup": "...",
},
});Now you are basically ready to go! You can now freely edit your setup.ts file and run setup.ts run to compile your project.
Make sure to check out the docs for more advanced usage and plugins.