1.0.2 • Published 9 months ago

@passionio/service-generator v1.0.2

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
9 months ago

service-generator

A CLI tool to generate new Passion.io microservices from a template repository.

Installation

You can use this tool in two ways:

1. Using npx (recommended)

npx @passionio/service-generator <service-name> [options]

2. Global Installation

# Using yarn
yarn global add @passionio/service-generator

# Using npm
npm install -g @passionio/service-generator

Usage

After installation, you can create a new service using:

create-passion-service <service-name> [options]

Options

  • -t, --template <repo> - Template repository (default: "independenc3/service-template")
  • -o, --output-dir <dir> - Output directory (default: current directory)
  • -r, --remote <url> - Remote repository URL to push to (optional)

Examples

  1. Create a basic service using the default template:
create-passion-service communities
  1. Create a service using a custom template:
create-passion-service notifications \
  -t my-org/custom-service-template
  1. Create a service in a specific directory:
create-passion-service payments \
  -o ./services
  1. Create a service and link it to a remote repository:
create-passion-service analytics \
  -r git@github.com:your-org/analytics-service.git

Important Notes

  1. The service name will automatically be converted to plural form if it's singular (e.g., "community" becomes "communities")
  2. The generator will:
    • Clone the template repository
    • Initialize git submodules
    • Replace all occurrences of placeholder names with your service name
    • Initialize a new git repository
    • Create an initial commit
    • Push to remote repository (if specified)

After Generation

Once your service is generated, follow these steps:

  1. Navigate to your new service directory:
cd <service-name>
  1. If you haven't specified a remote repository during generation:
    • Create a new repository on GitHub
    • Add the remote repository:
git remote add origin <repository-url>
git push -u origin main
  1. Update the service's README.md with specific details about your service
  2. Start developing!

License

UNLICENSED - Proprietary software

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago