Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,22 @@ jobs:
npx design.md lint DESIGN.md
node -e "import('@google/design.md/linter').then(m => console.log('OK:', Object.keys(m).length, 'exports'))"

npm-registry-smoke-windows:
runs-on: windows-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org

- name: Install @google/design.md from the public npm registry
shell: bash
run: |
set -euo pipefail
mkdir -p "$RUNNER_TEMP/npm-registry-smoke"
cd "$RUNNER_TEMP/npm-registry-smoke"
npm init -y
npm install "@google/design.md@latest"
node node_modules/@google/design.md/dist/index.js spec --rules-only --format json > /dev/null
node -e "import('@google/design.md/linter').then(m => console.log('OK:', Object.keys(m).length, 'exports'))"

20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,30 @@ Variants (hover, active, pressed) are expressed as separate component entries wi
npm install @google/design.md
```

Or run directly:
On **Windows**, quote the package name if your shell treats `@` specially (PowerShell, some terminals):

```bash
npm install "@google/design.md"
```

Or run directly (always resolves from the public npm registry):

```bash
npx @google/design.md lint DESIGN.md
```

#### `npm error ENOVERSIONS` (“No versions available for @google/design.md”)

The CLI is published as [`@google/design.md` on npm](https://www.npmjs.com/package/@google/design.md). `ENOVERSIONS` almost always means npm is not querying the public registry (custom `registry=` in `.npmrc`, a corporate mirror that has not synced this package, or a misconfigured `@google:registry` for the `@google` scope).

Check your effective registry:

```bash
npm config get registry
```

For a normal install from the internet it should be `https://registry.npmjs.org/`. After fixing config, retry with `npm cache clean --force` if a stale 404 was cached.

All commands accept a file path or `-` for stdin. Output defaults to JSON.

### `lint`
Expand Down
Loading