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.
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.
npm install -g @benjymoses/bootstrap
or if using PNPM
pnpm add -g @benjymoses/bootstrap
At your terminal run bootstrap
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.
- 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
- 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
- Vitest: fast testing framework compatible with Jest
- 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
- 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
The simple principles that guide the roadmap for this project are:
- It's for me first: start with features and defaults that I will personally get value from first to get to v1.0
- Adopt community ideas and trends: if the world changes or new good practices emerge, support them
- Optionality is important: look for opportunities to introduce optionality and flexiblity for users
- Defaults should be overriden: if you know better and have preferences, you should be able to express these
The wrapper for the CLI is built using Plop.
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.