Skip to main content

Getting Started with Presetter

30-Second Setup​

Ready to transform your development workflow? Let's set up Presetter in under 30 seconds:

# In a project with a package.json:
npx presetter use @presetter/preset-esm --package-manager=npm

πŸŽ‰ That's it! Your project now has TypeScript, ESLint, Vitest, Prettier, and all configurations set up automatically.

What Just Happened?​

When you ran presetter use, Presetter:

  • βœ… Installed all development dependencies (TypeScript, ESLint, Vitest, etc.)
  • βœ… Generated configuration files (tsconfig.json, eslint.config.ts, vitest.config.ts, etc.)
  • βœ… Set up build and test scripts
  • βœ… Generated git hook files; the declared prepare script runs setup on subsequent installs

The project’s packageManager or lockfile takes priority over the fallback flag. Installation covers pnpm, Bun, dependency build approval, and existing declarations.

Your project structure now looks like this:

my-project/
β”œβ”€β”€ package.json
+ β”œβ”€β”€ presetter.config.ts # Your preset configuration
+ β”œβ”€β”€ tsconfig.json # TypeScript configuration (generated)
+ β”œβ”€β”€ eslint.config.ts # ESLint configuration (generated)
+ β”œβ”€β”€ vitest.config.ts # Vitest test configuration (generated)
+ β”œβ”€β”€ .prettierrc.json # Prettier formatting (generated)
+ β”œβ”€β”€ .gitignore # Git ignore patterns (generated)
└── src/
└── index.ts # Your code here

Start Developing​

Now you can immediately start using professional development tools:

# Build your TypeScript project
npm run build

# Run tests with Vitest
npm run test

# Lint and format your code (ESLint + Prettier)
npm run lint

# Run tests in watch mode
npm run test:watch

# Check test coverage
npm run test:coverage

Choose Your Preset​

Different presets are optimized for different project types:

πŸš€ Modern ES Modules Project​

npx presetter use @presetter/preset-esm

βš›οΈ React Application​

npx presetter use @presetter/preset-esm @presetter/preset-react

πŸ“š NPM Library (Dual CJS/ESM)​

npx presetter use @presetter/preset-hybrid

🏒 Monorepo​

npx presetter use @presetter/preset-monorepo

Next Steps​

  • Customize your setup: Learn about Core Concepts to understand how Presetter works
  • Add custom rules: See Configuration to override preset settings
  • Explore presets: Check out the Preset Ecosystem to find the perfect preset for your needs
  • Build something: Your development environment is ready - start coding!

Need Help?​