-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
6,679 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Merge | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
merge: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Used for conventional commit ranges | ||
|
||
- name: Install | ||
shell: bash | ||
run: yarn install | ||
# - uses: Workday/canvas-kit-actions/install@v1 | ||
# with: | ||
# node_version: 18.x | ||
|
||
- name: Build Tokens | ||
shell: bash | ||
run: yarn build:tokens --no-cache | ||
|
||
# Build Storybook and extract component stories for Storybook aggregation. This will be used | ||
# for Chromatic rebaselining and publishing to GH Pages. | ||
- name: Build Storybook | ||
shell: bash | ||
run: yarn build-storybook --no-cache | ||
|
||
- name: Publish Storybook | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: docs/storybook/@workday/canvas-tokens-docs/ | ||
|
||
## Create a Chromatic baseline auto-accepting changes. Chromatic changes are already accepted | ||
## in PRs, so we don't need to manually approve them here again. This new baseline will be | ||
## used for future PRs. New PRs may show extra Chromatic changes until the "Update Branch" | ||
## button is used in PRs which will pull this new baseline. | ||
- name: Update Chromatic Baseline | ||
uses: chromaui/action@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
projectToken: chpt_a9e354687a28e6e | ||
storybookBuildDir: docs/storybook/@workday/canvas-tokens-docs/ | ||
exitOnceUploaded: true | ||
exitZeroOnChanges: true | ||
autoAcceptChanges: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"extends": "nx/presets/npm.json", | ||
"$schema": "./node_modules/nx/schemas/nx-schema.json", | ||
"tasksRunnerOptions": { | ||
"default": { | ||
"runner": "nx/tasks-runners/default", | ||
"options": { | ||
"cacheableOperations": ["build", "lint", "test", "e2e"] | ||
"cacheableOperations": ["build", "lint", "test", "e2e", "build-storybook"] | ||
} | ||
} | ||
} | ||
}, | ||
"extends": "nx/presets/npm.json", | ||
"$schema": "./node_modules/nx/schemas/nx-schema.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type {StorybookConfig} from '@storybook/react-vite'; | ||
import {nxViteTsPaths} from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; | ||
import {mergeConfig} from 'vite'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../**/*.stories.@(mdx|tsx)', '../stories/*.mdx'], | ||
addons: ['@storybook/addon-essentials'], | ||
framework: { | ||
name: '@storybook/react-vite', | ||
options: {}, | ||
}, | ||
|
||
viteFinal: async config => | ||
mergeConfig(config, { | ||
plugins: [nxViteTsPaths()], | ||
optimizeDeps: { | ||
include: ['@workday/canvas-tokens-web'], | ||
}, | ||
}), | ||
}; | ||
|
||
export default config; | ||
|
||
// To customize your Vite configuration you can use the viteFinal field. | ||
// Check https://storybook.js.org/docs/react/builders/vite#configuration | ||
// and https://nx.dev/packages/storybook/documents/custom-builder-configs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script> | ||
document.title = 'Canvas Tokens Storybook'; | ||
</script> | ||
|
||
<style type="text/css"> | ||
* { | ||
box-sizing: border-box; | ||
} | ||
</style> | ||
|
||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&family=Roboto+Mono&family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {Preview} from '@storybook/react'; | ||
import '@workday/canvas-tokens-web/dist/css/base/_variables.css'; | ||
import '@workday/canvas-tokens-web/dist/css/brand/_variables.css'; | ||
import '@workday/canvas-tokens-web/dist/css/system/_variables.css'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
chromatic: {disableSnapshot: false}, | ||
options: { | ||
storySort: { | ||
order: ['Docs', ['Getting Started'], 'Visual Tests'], | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"composite": true, | ||
"outDir": "" | ||
}, | ||
"files": [ | ||
"../../../node_modules/@nx/react/typings/styled-jsx.d.ts", | ||
"../../../node_modules/@nx/react/typings/cssmodule.d.ts", | ||
"../../../node_modules/@nx/react/typings/image.d.ts" | ||
], | ||
"exclude": ["../**/*.spec.ts", "../**/*.spec.js", "../**/*.spec.tsx", "../**/*.spec.jsx"], | ||
"include": [ | ||
"../src/**/*.stories.ts", | ||
"../src/**/*.stories.js", | ||
"../src/**/*.stories.jsx", | ||
"../src/**/*.stories.tsx", | ||
"../src/**/*.stories.mdx", | ||
"*.ts", | ||
"*.tsx", | ||
"*.js" | ||
] | ||
} |
Oops, something went wrong.