1.0.13 • Published 2 months ago

@teamspirit/create-app v1.0.13

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

@teamspirit/create-app

npm version

A Command Line Interface (CLI) tool to quickly set up new TypeScript projects based on pre-defined Bitbucket boilerplates.

Features

  • Interactive prompts for selecting boilerplates and entering credentials.
  • Clones private Bitbucket repositories using HTTPS and app passwords.
  • Supports multiple boilerplates configurable via boilerplates.json.
  • Allows specifying a custom output directory for the new project.
  • Checks if the target directory already exists to prevent overwrites.
  • Shows progress during the cloning stage.

Prerequisites

  • Node.js (v14 or higher recommended)
  • npm
  • Git
  • A Bitbucket account with access to the boilerplate repositories.
  • A Bitbucket app password with Repositories: Read permissions.

Bitbucket App Password

It is strongly recommended to use a Bitbucket App Password instead of your main account password for security.

When creating the app password in Bitbucket, grant it the following permissions:

  • Repositories: Read

This is the minimum permission required for the tool to clone the boilerplate repositories.

Installation & Usage

The easiest way to use @teamspirit/create-app is with npx, which will download and run the latest version automatically:

npx @teamspirit/create-app

The CLI will then guide you through the following prompts:

  1. Select Boilerplate: Choose from the available boilerplates (e.g., "App Router", "Pages Router").
    • These are defined in the boilerplates.json file within the package.
  2. Bitbucket Username: Enter your Bitbucket username.
  3. Bitbucket App Password: Enter your Bitbucket app password (input will be hidden).
  4. Project Name: Enter the desired name for your new project directory.
  5. Custom Output Directory?: Optionally specify a different parent directory for your new project.
    • If yes, you'll be prompted to enter the path to the output directory.

Example Flow:

$ npx @teamspirit/create-app
? Which boilerplate do you want to use? › App Router
? Enter your Bitbucket username: your_username
? Enter your Bitbucket app password: [hidden]
? Enter the name for your new project: my-awesome-app
? Do you want to specify a custom output directory? (Default: current directory) › No

šŸ”„ Preparing to clone boilerplate...
šŸ”„ Cloning teamspiritdigital/nextjs-boilerplate-approuter into ./my-awesome-app
āœ… Done! Your new app is ready in ./my-awesome-app

Project created successfully!

Next steps:
  cd my-awesome-app
  npm install (or yarn install)
  npm start (or yarn start)

Configuration

Boilerplates (boilerplates.json)

The available boilerplates are defined in a boilerplates.json file that is packaged with this tool. It maps a user-friendly name to a Bitbucket repository path (without the .git extension and Bitbucket domain).

Example boilerplates.json:

{
  "App Router": "yourteam/app-router-boilerplate",
  "Pages Router": "yourteam/pages-router-boilerplate"
}

License

ISC

1.0.13

2 months ago

1.0.12

2 months ago

1.0.11

2 months ago

1.0.10

2 months ago

1.0.9

2 months ago

1.0.8

2 months ago

1.0.7

2 months ago

1.0.6

2 months ago

1.0.5

2 months ago

1.0.4

2 months ago

1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

2 months ago