-
Notifications
You must be signed in to change notification settings - Fork 375
Convert demo application to Vite #10510
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,6 +136,14 @@ | |
| "react/jsx-key": "off", | ||
| "no-console": "off" | ||
| } | ||
| }, | ||
| { | ||
| "files": ["packages/react-integration/demo-app-ts/**/*"], | ||
| "rules": { | ||
| "patternfly-react/no-anonymous-functions": "off", | ||
| "react/react-in-jsx-scope": "off", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no need for this, as Vite uses the JSX transform. |
||
| "spaced-comment": "off" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This gives a false positive, so I've disabled it for now. |
||
| } | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,7 +75,7 @@ | |
| "build": "yarn clean && yarn build:generate && yarn build:esm && yarn build:cjs && yarn build:subpaths && yarn build:single:packages", | ||
| "build:cjs": "tsc --build --verbose packages/tsconfig.cjs.json", | ||
| "build:esm": "tsc --build --verbose packages/tsconfig.json", | ||
| "build:integration": "lerna run build:demo-app --stream", | ||
| "build:integration": "lerna run build --scope=demo-app-ts --stream", | ||
| "build:docs": "yarn workspace @patternfly/react-docs build:docs", | ||
| "build:generate": "lerna run generate --parallel --stream", | ||
| "build:subpaths": "lerna run subpaths --parallel --stream", | ||
|
|
@@ -93,11 +93,10 @@ | |
| "lint:tests": "yarn lint packages/*/src/components/*/__tests__/*.test.*", | ||
| "prepare": "ts-patch install -s", | ||
| "serve:docs": "yarn workspace @patternfly/react-docs serve", | ||
| "serve:integration": "lerna run serve:demo-app", | ||
| "serve:integration": "lerna run preview --scope=demo-app-ts", | ||
| "start": "yarn build && concurrently --kill-others \"yarn watch\" \"yarn workspace @patternfly/react-docs develop\"", | ||
| "start:cypress": "lerna run cypress:open", | ||
| "start:demo-app": "lerna run start:demo-app --stream", | ||
| "start:demo-app:hot": "lerna run start:demo-app:hot --stream", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hot reloading is default in Vite during development, so it is no longer needed to keep this separate script around. |
||
| "start:demo-app": "lerna run dev --scope=demo-app-ts --stream", | ||
| "test": "TZ=EST LC_ALL=en_US.UTF8 jest packages", | ||
| "test:a11y": "lerna run test:a11y --stream", | ||
| "test:integration": "yarn workspace @patternfly/react-integration test:integration", | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <title>React Demo App</title> | ||
| <link rel="icon" type="image/svg+xml" href="/vite.svg"> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| import React from 'react'; | ||
| import { | ||
| BackToTop, | ||
| Card, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This linting rule gives false positives for class components that already have a displayName, so I've turned this off. For example: