Skip to content

Installation guide

This guide will walk you through installing and using the Rshop Bootstrap CLI to scaffold new Rshop Bootstrap projects.

1. Generate a GitHub Personal Access Token (PAT)

Since the CLI tool is a private package, you will need a GitHub Personal Access Token (PAT) to authenticate with GitHub Packages. Also you will have to be added to the package with at least READ access. To do so contact someone from the team.

Steps to Generate a PAT

  1. Go to GitHub → Settings → Developer Settings → Personal Access Tokens.
  2. Click "Generate new token (classic)".
  3. Set the expiration date (recommended: No expiration or set a long duration).
  4. Under "Select scopes", enable the following:
    • read:packages (Required to install private packages)
    • repo (Required for private repositories)
  5. Click "Generate token" and copy the generated token.

2. Configure Global .npmrc for Authentication

Now, you need to create or update your global ~/.npmrc file to authenticate with GitHub Packages. The first line is needed to restrict the use of github package registry for packages with this scope.

Steps to Configure ~/.npmrc

  1. Open a terminal and run:
    sh
    echo "@MartinLednarLedo:registry=https://npm.pkg.github.com/" >> ~/.npmrc
    echo "//npm.pkg.github.com/:_authToken=YOUR_PERSONAL_ACCESS_TOKEN" >> ~/.npmrc

3. Scaffolding New Project

Use the following command to create a new project:

TIP

  • When running this command for the first time, you may be prompted to authenticate with username and password. Use your username, but for password use your generated PAT.

  • Also you have to be added to the Rshop bootstrap as collaborator. To do so contact someone from the team.

sh
npx @MartinLednarLedo/rshop-bootstrap-cli create YOUR_PROJECT_NAME

Final steps

  1. Open project in IDE of your choice
  2. Install dependencies:
sh
npm install
  1. Run the app:
sh
npm run dev

And that's it! You are good to go 🎉

Made with ♥️ by Riešenia