open-index/open-npm huggingface dataset:
npm package: @instructure/institutional-tagging
Description: Institutions need a flexible system for categorizing and tracking users, courses and other resources beyond Canvas’s built-in organizational structures.
Latest version: 1.1.0

# @instructure/institutional-tagging

Institutions need a flexible system for categorizing and tracking users, courses and other resources beyond Canvas’s built-in organizational structures.

## Installation

```shell
# ./canvas-lms 
yarn add -W @instructure/institutional-tagging
```

`-W` _flag to add to the root workspace_

### Peer Dependencies

```json
{
  "react": "^18.0.0",
  "@instructure/ui-*": "^10.0.0",
  "@instructure/emotion": "^10.0.0"
}
```

## Usage

```tsx
<AccountTags />
```

## Development

```shell
# Start Storybook sandbox
pnpm storybook

# Run tests
pnpm test

# Run tests with coverage
pnpm test --coverage

# Build
pnpm build

# Type check
pnpm type-check
```

### Mock server

```shell
# Start the app with a local mock API, hot-reloading locales, and console labels per process
pnpm dev:mock
```

This runs three processes concurrently:
- `web-app` — Vite dev server
- `mock-server` — local API mock (see `scripts/mock-server.mjs`)
- `locales` — watches `src/constants/i18n.ts` and regenerates + validates locales on change

### Locales

Translations are defined in `src/constants/i18n.ts` and generated into `locales/en.json`.

```shell
# Regenerate locales/en.json from src/constants/i18n.ts and validate
pnpm locales:generate

# Watch src/constants/i18n.ts and regenerate + validate on every change
pnpm locales:watch
```

Validation enforces two rules:

| Rule | Behaviour |
|---|---|
| Keys must be alphabetically sorted within each object | Exits with error — run `pnpm locales:sort` to fix |
| No unused keys | Prints a warning — does not fail the process |

```shell
# Auto-sort keys in src/constants/i18n.ts alphabetically
pnpm locales:sort

# Validate only (sort check + unused key warning)
pnpm locales:validate
```