Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pxweb2 9 install chromatic #12

Merged
merged 2 commits into from
Jan 18, 2024
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
11 changes: 6 additions & 5 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@

name: "Chromatic"

on: push
on:
pull_request:
branches:
- main
paths:
- 'libs/pxweb2-ui/**'

jobs:
chromatic:
Expand All @@ -15,13 +20,9 @@ jobs:
fetch-depth: 0

- name: Install dependencies
# ⚠️ Pick one of these, matching the package manager for your project
run: npm ci
# run: pnpm install
# run: yarn install --immutable --immutable-cache --check-cache

- name: Publish to Chromatic
uses: chromaui/action@latest
with:
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ node_modules
/libpeerconnection.log
npm-debug.log
yarn-error.log
build-storybook.log
testem.log
/typings

Expand Down
3 changes: 3 additions & 0 deletions libs/pxweb2-ui/src/lib/pxweb2-ui.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
* .container {
* }
*/
.button{
background-color: aqua;
}
7 changes: 0 additions & 7 deletions libs/pxweb2-ui/src/lib/pxweb2-ui.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,3 @@ export const Secondary: Story = {
},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/Welcome to Pxweb2Ui!/gi)).toBeTruthy();
},
};
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"license": "MIT",
"scripts": {
"start": "npx nx run pxweb2:serve",
"start-storybook": "npx nx run pxweb2-ui:storybook"
"start-storybook": "npx nx run pxweb2-ui:storybook",
"build-storybook": "npx nx run pxweb2-ui:build-storybook"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -43,6 +44,7 @@
"@vitejs/plugin-react": "^4.2.0",
"@vitest/coverage-v8": "~0.34.6",
"@vitest/ui": "~0.34.6",
"chromatic": "^10.3.1",
"cypress": "^13.0.0",
"eslint": "~8.48.0",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -60,5 +62,7 @@
"vite": "^5.0.0",
"vite-plugin-dts": "~2.3.0",
"vitest": "~0.34.6"
}
},
"readme": "ERROR: No README data found!",
"_id": "@pxweb2/[email protected]"
}