1.0.5 • Published 5 months ago

create-project-starter v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Node.js TypeScript Boilerplate Generator

A CLI tool to quickly generate a Node.js project with TypeScript, ESLint, Prettier, and more. Perfect for starting new projects with a solid foundation. All the other starter template like Node with Js, framework selection like express/fastify, controller based etc are currently on development.

Features

  • TypeScript Support: Pre-configured tsconfig.json for modern TypeScript development
  • ESLint & Prettier: Integrated linting and formatting for clean, consistent code
  • Yarn Support: Uses Yarn for dependency management
  • Flexible Installation: Install in a new folder or the current directory

Installation

Option 1: Install Globally (Recommended for Frequent Use)

You can install the package globally using npm or Yarn:

# Using npm
npm install -g create-project-starter

# Using Yarn
yarn global add create-project-starter

Option 2: Use npx (No Installation Required)

You can use npx to run the package without installing it globally:

# Create a New Project
npx create-project-starter my-project

# Install in the Current Directory
npx create-project-starter .

Usage

1. Create a New Project in a Folder

To generate a new project in a specific folder, run:

create-project-starter <project-name>

Replace <project-name> with the name of your project. This will create a new directory with the boilerplate files.

Example:

create-project-starter my-new-project

2. Install in the Current Directory

To install the boilerplate files in the current directory, run:

create-project-starter .

This will not create a new folder but will install all the files in the current directory.

Run

yarn dev

This will run the project using yarn

Project Structure

my-new-project/ (or current directory)
├── src/
    ├──constants
    ├──helpers
    ├──modules
    ├──routes
    ├──schemas
    ├──type
    ├──utility
│   ├── app.ts
├── .env
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md

Scripts

The generated project includes the following npm/Yarn scripts:

  • yarn build: Compiles TypeScript files to JavaScript
  • yarn start: Runs the compiled JavaScript files
  • yarn dev: Runs the project in development mode using ts-node
  • yarn lint: Lints the project using ESLint
  • yarn lint:fix: Automatically fixes linting errors

Customization

You can customize the boilerplate by modifying the files in the templates/ directory of this package. Add or remove tools, frameworks, or configurations as needed.

Contributing

Contributions are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a pull request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

If you encounter any issues or have questions, feel free to open an issue on the GitHub repository.

Author

Ali Sadain Tanvir

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.1

5 months ago