Skip to content

benjymoses/bootstrap

Repository files navigation

Bootstrap


Bootstrap your TypeScript project in an opinionated way

When you're a less experienced developer, picking through package managers, sensible defaults, and helpful developer packages can be hard. This tool bootstraps an empty folder with everything you need to get started writing code - quickly.

The initial release features my opinionated defaults that I enjoy, but future iterations will allow for customisation and overrides.

Simply run Bootstrap, select your language and project choices, answer any prompts that are needed and your project will be quickly created and ready for you to get started writing code.

Caution

At this stage, this tool has not been designed or tested to run in existing repositories. It it intended to be used in a completely empty folder.

Getting started

There are 2 options for how to use this tool. To quickly run it, you can directly execute the package, or you can install the package globally for frequent convenient use.

Install globally and run locally

npm install -g @benjymoses/bootstrap

or if using PNPM

pnpm add -g @benjymoses/bootstrap

At your terminal run bootstrap

Features

When running Bootstrap, you'll be asked a minimal set of prompted questions based on your selections. These are used to populate relevant generated files.

📦 Basic project configuration

  • package.json: my defaults for ES Modules, and installs PNPM if it's not already installed
  • tsconfig.json: my default preferences including es2023 and DOM in the 'lib'
  • .gitignore: my defaults for MacOS filesystem, node projects, test coverage, and build folders
  • scripts: creates common scripts within package.json with defaults for added options
  • src/index.ts: provides a sample TypeScript file to quickly validate execution and testing frameworks

🚚 Additional packages

  • Commitizen: for conventional commits with Gitmoji support
  • Husky: with default Git hooks to enforce conventional commits from Commitizen
  • TSX: for directly executing TypeScript without a manual transpilation to JavaScript
  • ESBuild: for bundling and minification of distribution assets

🧪 Testing frameworks

  • Vitest: fast testing framework compatible with Jest

🌱 Monorepo support

  • Turborepo: for monorepo management, script coordination, and caching
  • Turborepo Generators: for creating new applications with the monorepo from templates
  • Centralised packages: centralises the TypeScript and Vitest config as packages
  • PNPM Workspace: to execute PNPM across apps and packages
  • Everything else: all of the other defaults from a regular Bootstrap repo

🗃️ Local Git repository

  • initial commit: repository starts with a main branch and once Bootstrap has finished installing your packages will perform an initial commit so you're ready to get started

Principles

The simple principles that guide the roadmap for this project are:

  1. It's for me first: start with features and defaults that I will personally get value from first to get to v1.0
  2. Adopt community ideas and trends: if the world changes or new good practices emerge, support them
  3. Optionality is important: look for opportunities to introduce optionality and flexiblity for users
  4. Defaults should be overriden: if you know better and have preferences, you should be able to express these

Acknowledgments

The wrapper for the CLI is built using Plop.

Contributing

After v1.0 this project will be open to contributions in the form of pull requests, and will have Issues templates for feature requests and bug reports.

About

Bootstraps projects with common settings I like

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •