-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from cuweb/feature/github-pages
Feature/GitHub pages
- Loading branch information
Showing
39 changed files
with
6,381 additions
and
672 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,6 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"], | ||
"rules": { | ||
"type-enum": [2, "always", ["add", "change", "deprecate", "doc", "fix", "refactor", "release", "revert", "test"]] | ||
} | ||
} |
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,48 @@ | ||
## PR Checklist & Notes | ||
|
||
### What type of PR is this? (check all applicable) | ||
|
||
- [ ] New component | ||
- [ ] New feature | ||
- [ ] Refactor | ||
- [ ] Bug fix | ||
- [ ] Optimization / Build Tools | ||
- [ ] Documentation Update | ||
|
||
### Related Tickets & Documents | ||
|
||
- Jira Ticket / Github Issue # | ||
|
||
### Is this a breaking change? | ||
|
||
If yes, please note which project will be impacted. | ||
|
||
- [ ] Yes | ||
- [ ] No | ||
|
||
### Have you made an entry in the Changelog? | ||
|
||
If not, please make an entry or your PR will be declined. Add new entries under the "Unreleased" section of the changelog. | ||
|
||
- [ ] Yes | ||
- [ ] No | ||
|
||
### Have you made changes to dependencies? | ||
|
||
If you've made changes to dependencies please note them here, adding if they've been added, removed or updated, including packages version where applicable. | ||
|
||
- [ ] Added | ||
- [ ] Updated | ||
- [ ] Removed | ||
- [ ] Combo of any of the above | ||
- [ ] No | ||
|
||
### QA Instructions, Screenshots, Recordings | ||
|
||
Please replace this line with instructions on how to test your changes, and if applicable add a note | ||
about any UI changes or if a test should be done on a specific browser. Add any other detail relevant to this PR. | ||
|
||
### UI accessibility concerns? | ||
|
||
If your PR includes UI changes, please replace this line with details on how | ||
accessibility is impacted and tested. If there are no accessibility concerns delete this section. |
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,29 @@ | ||
name: Storybook Deploy | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
jobs: | ||
build-and-deploy: | ||
name: Build and deploy Storybook | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build-storybook | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=4096 | ||
|
||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: storybook-static | ||
|
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx commitlint --edit $1 |
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,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn build | ||
# npm run build |
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,8 @@ | ||
{ | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"bracketSpacing": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[ | ||
{ | ||
"path": "dist/rds-forms.es.js", | ||
"limit": "125 kB" | ||
}, | ||
{ | ||
"path": "dist/rds-forms.umd.js", | ||
"limit": "125 kB" | ||
} | ||
] |
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,27 +1,52 @@ | ||
# React + TypeScript + Vite | ||
# Raven Design System - Forms | ||
|
||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
## Build Tools | ||
|
||
Currently, two official plugins are available: | ||
- [React](https://reactjs.org/) | ||
- [TypeScript](https://www.typescriptlang.org/) | ||
- [Storybook](https://storybook.js.org/) | ||
- [Vite](https://vitejs.dev/) | ||
- [Tailwind CSS](https://tailwindcss.com/) | ||
|
||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
## Getting Started | ||
|
||
## Expanding the ESLint configuration | ||
1. In a terminal window open your install location and run the following: | ||
|
||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: | ||
```shell | ||
git clone https://github.com/cuweb/rds-forms.git | ||
``` | ||
|
||
- Configure the top-level `parserOptions` property like this: | ||
2. Once the clone is complete move into the `RDS` directory and run: | ||
|
||
```js | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: ['./tsconfig.json', './tsconfig.node.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
``` | ||
```shell | ||
npm install | ||
``` | ||
|
||
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` | ||
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` | ||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list | ||
3. Run Storybook | ||
|
||
```shell | ||
npm run storybook | ||
``` | ||
|
||
4. Other useful shell commands | ||
|
||
- `npm run clean` - deletes node modules, package lock and run npm install | ||
- `npm run cypress` - launch cypress app | ||
- `npm run format` - format files with prettier | ||
- `npm run lint` - check for errors with eslint | ||
- `npm run size` - compare compiled size against pre-defined limit | ||
|
||
|
||
## Comment Linting | ||
|
||
When adding a commit with a commit you may be blocked if you do not prefix your comment with one of the following types. So a commit should look like: `git commit -m "change: updated spacing around button"`. The prefix requires a colon to separate it from the comment. | ||
|
||
- `add` - used when adding something new such as a component, story or test file | ||
- `change` - used when making a change to an existing file in the project | ||
- `doc` - used when updating something related to documentation | ||
- `fix` - used when fixing an error, warning or something else | ||
- `perf` - used when making changes relating to performance | ||
- `refactor` - used when refactoring something such as a component or build tool | ||
- `release` - used when preparing a new release | ||
- `revert` - used when revert to a past commit | ||
- `test` - used when making changes relating to testing |
Oops, something went wrong.