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
preparescript 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?β
- π New concepts? Read Core Concepts
- π§ Having issues? Check Advanced Topics for troubleshooting
- β Questions? Visit Advanced Topics for frequently asked questions
- π Found a bug? Report it on GitHub