Skip to content

Commit

Permalink
switch to pnpm and upgrade storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
winkerVSbecks committed Aug 1, 2024
1 parent 7b7232c commit 927041c
Show file tree
Hide file tree
Showing 10 changed files with 19,133 additions and 11,261 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,26 @@ jobs:
# Job steps
steps:
- uses: actions/checkout@v1

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
run: yarn
# 👇 Adds Chromatic as a step in the workflow
run: pnpm install

- name: Publish to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,31 @@ jobs:
- name: Prepare repository
run: git fetch --unshallow --tags

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm install

- name: Lint
run: yarn lint
run: pnpm run lint

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn release
pnpm run release
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@

#### 🐛 Bug Fix

- some helper exports were removed in the previous PR, adding those ba… [#53](https://github.com/chromaui/tetra/pull/53) ([@winkerVSbecks](https://github.com/winkerVSbecks))
- some helper exports were removed in the previous PR, adding those ba… [#53](https://github.com/chromaui/tetra/pull/53) ([@winkerVSbecks](https://github.com/winkerVSbecks))

#### Authors: 1

Expand Down
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,26 @@

<img src="public/cover.jpg" />

This library centralised Chromatic and Storybooks' style guides as well as an exhaustive list of components use accross our suite of marketing sites. This is also a good excuse to test all the new features that both Storybook and Chromatic offers. Please feel free to learn from it and ask any questions that comes your way.

https://tetra.chromatic.com
Style guide and UI components for Chromatic's docs and marketing sites. https://tetra.chromatic.com

## Install

```console
yarn add @chromatic-com/tetra
pnpm add @chromatic-com/tetra
```

## To Do

- [ ] Replace fonts in Text by the new text helpers
- [ ] Move icons to a new library and import it as primitive inside the Icon component

## Developing

Watch and rebuild code with `tsup` and runs Storybook to preview your UI during development.

```console
yarn storybook
pnpm run storybook
```

## Building

Build package with `tsup` for production.

```console
yarn build
pnpm run build
```
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"url": "git+https://github.com/chromaui/tetra.git"
},
"scripts": {
"dev": "concurrently -n \"Build,SB\" \"yarn build --watch\" \"yarn storybook\" ",
"dev": "concurrently -n \"Build,SB\" \"pnpm run build --watch\" \"pnpm run storybook\" ",
"build": "tsup --onSuccess \"cp -a public/. dist/public\"",
"type-check": "tsc",
"lint": "eslint --ignore-path .gitignore \"src/**/*.+(ts|js|tsx)\"",
"lint:fix": "yarn lint --fix && prettier --write .",
"lint:fix": "pnpm run lint --fix && prettier --write .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"release": "yarn build && auto shipit",
"release": "pnpm run build && auto shipit",
"prepare": "node ./prepare.js"
},
"lint-staged": {
Expand Down Expand Up @@ -109,5 +109,6 @@
},
"resolutions": {
"jackspeak": "2.1.1"
}
},
"packageManager": "[email protected]+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903"
}
Loading

0 comments on commit 927041c

Please sign in to comment.