Skip to content

Installation

Getting started

We currently only support installation of Grammar through NPM

Installation

  1. Add or update a .npmrc file

    Start by creating or updating a local .npmrc file and add

    @tpg:registry=https://pkgs.dev.azure.com/teleplanglobe/_packaging/GrammarWeb/npm/registry/
    @tpg:always-auth=true

    This allows NPM to fetch all @tpg packages from our Azure DevOps feed and to always authenticate when accessing it.

  2. Authenticate with Azure Devops

    The authentication process differs depending on which platform you’re currently on.

    Windows Authentication

    Install the vsts-npm-auth package and run the command vsts-npm-auth -config .npmrc in the same working directory as your .npmrc file.

    If you prefer not to use vsts-npm-auth, refer to the macOS/Linux guide below to authenticate using a Personal Access Token (PAT).

    Macbook & Linux authentication

    TODO: Write guide. // Can also follow the steps in the other pane here: https://learn.microsoft.com/en-us/azure/devops/artifacts/npm/npmrc?view=azure-devops&tabs=other

  3. Install Grammar

    Now you should be able to install Grammar using npm install @tpg/grammar-web. There are multiple versions you can install:

    Our latest prod release

    npm install @tpg/grammar-web@latest

    Our latest beta release

    @tpg/grammar-web@beta

    Our adhoc release, used primarily when testing small changes and bugfixes. This one isn’t as important, and we will usually ask you to install from this package when attempting to fix certain bugs or test something.

    npm install @tpg/grammar-web@adhoc

Check out grammar-web and typography for guides on how to apply theming and load fonts.