Skip to content

Commit

Permalink
APP-2072 Use pnpm instead of npm in PRIME
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanlookpotts committed Jun 23, 2023
1 parent 284c8e9 commit de88aae
Show file tree
Hide file tree
Showing 7 changed files with 9,147 additions and 25,679 deletions.
12 changes: 7 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ inputs:
runs:
using: 'composite'
steps:
- name: 'Install Node.js'
uses: actions/setup-node@v3
- name: 'Install pnpm ${{ inputs.pnpm-version }}'
uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # v2.2.4
- name: 'Install Node.js ${{ inputs.node-version }}'
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: ${{ inputs.node-version }}
cache: npm
cache: pnpm

- name: 'Install development dependencies'
- name: 'Install dependencies'
shell: bash
run: npm ci --audit=false
run: pnpm install --frozen-lockfile
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install 🔧
uses: ./.github/actions/setup
- name: Run lints and checks
run: npm run check
run: pnpm run check

build:
runs-on: ubuntu-latest
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Install 🔧
uses: ./.github/actions/setup
- name: Build 🏗️
run: npm run build
run: pnpm run build
- name: Upload npm artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ Please follow these instructions for contributing to `PRIME`.
To run the `Storybook` page locally, pull down the project and run:

```bash
npm install
npm run storybook
pnpm install
pnpm run storybook
```

More detailed docs exist on [the storybook](https://www.viam.com/prime).
More detailed docs exist on [the storybook](https://prime.viam.com).

## Playground

To use the component playground, run:

```bash
npm start
pnpm start
```

The playground will open in your browser automatically. End-to-end tests run against the playground.
Expand All @@ -41,17 +41,17 @@ Linked below are some articles that provide knowledge for how to best build reus
To verify that static assets build correctly:

```shell
npm run build
pnpm run build
```

You can typecheck and lint using:

```shell
# check linting, types, a11y, and other component quality
npm run check
pnpm run check

# autoformat code and other files
npm run format
pnpm run format
```

### Tests
Expand All @@ -63,8 +63,8 @@ To run tests locally:
npx playwright install --with-deps

# run tests, with optional debugging
npm run test
npm run test-dev
pnpm run test
pnpm run test-dev
```

When adding a test, look for the following files:
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,35 @@ All elements are prefixed with `v-`. This stands for Viam, the cool company wher
To use the playground, go to the `playground` directory, and:

```bash
npm install
npm start
pnpm install
pnpm start
```

Or to run in production mode:

```bash
npm run build
npm run serve
pnpm run build
pnpm run serve
```

## Linting / Testing

To lint and typecheck:

```bash
npm run lint
npm run check
pnpm run lint
pnpm run check
```

To test:

```bash
npm run test-dev # to test with the playwright debug UI
pnpm run test-dev # to test with the playwright debug UI
# or
npm run test # to test in headless mode
pnpm run test # to test in headless mode

# to run specific tests
npm run test <test-name> # for <test-name>.spec.ts
pnpm run test <test-name> # for <test-name>.spec.ts
```

### Browser Compatibility
Expand Down
Loading

0 comments on commit de88aae

Please sign in to comment.