-
Notifications
You must be signed in to change notification settings - Fork 2
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 #421 from ral-facilities/DSEGOG-341-migrate-cra-to…
…-vite DSEGOG-341 Migrate from CRA to Vite
- Loading branch information
Showing
203 changed files
with
4,763 additions
and
10,473 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
REACT_APP_OPERATIONSGATEWAY_BUILD_DIRECTORY=/ | ||
REACT_APP_E2E_TESTING=false | ||
VITE_APP_OPERATIONS_GATEWAY_BUILD_DIRECTORY=/ | ||
VITE_APP_INCLUDE_MSW=false | ||
VITE_APP_BUILD_STANDALONE=false |
File renamed without changes.
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ screenshots/ | |
**/cypress/fixtures/example.json | ||
|
||
# production | ||
/build | ||
dist | ||
|
||
# misc | ||
.DS_Store | ||
|
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,52 +1,48 @@ | ||
# operationsgateway | ||
|
||
OperationsGateway - user interface for operational data | ||
|
||
# Getting Started with Create React App | ||
## Getting Started with Vite | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
This project uses [Vite](https://vitejs.dev/). | ||
|
||
## Available Scripts | ||
### Available Scripts | ||
|
||
In the project directory, you can run: | ||
|
||
### `yarn start` | ||
### `yarn install` | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
This will install all the project dependencies. Running `yarn install` at the top | ||
level initialises all the packages, and you will be ready to start development in any of them! | ||
|
||
The page will reload if you make edits.\ | ||
You will also see any lint errors in the console. | ||
### `yarn dev` | ||
|
||
You will need to create a settings file - you can use `./public/operationsgateway-settings.example.json` | ||
as a base. Setting `apiUrl` to `""` enables request mocking via `msw`. | ||
Runs the `dev` script, which runs the app in development mode. | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
|
||
### `yarn test` | ||
|
||
Launches the test runner in the interactive watch mode.\ | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### `yarn build` | ||
Runs unit tests for all packages | ||
|
||
Builds the app for production to the `build` folder.\ | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
### `yarn e2e` | ||
|
||
The build is minified and the filenames include the hashes.\ | ||
Your app is ready to be deployed! | ||
Runs e2e tests for all packages | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
### `yarn lint` | ||
|
||
### `yarn eject` | ||
Lints all packages | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!** | ||
### `yarn build` | ||
|
||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
Builds the app for production to the `dist` folder.\ | ||
|
||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. | ||
The build is minified and the filenames include the hashes. | ||
Your app is ready to be deployed! | ||
|
||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. | ||
See the section about [building for production](https://vitejs.dev/guide/build.html) for more information. | ||
|
||
## Learn More | ||
### `yarn preview` | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
Deploys a static version of the build from the `dist` directory to port 5001. Use `yarn preview:build` to build and preview it in SciGateway. | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). | ||
For development purposes, use `yarn preview:build:dev` to build in watch mode so that changes are built automatically. |
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
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 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
Oops, something went wrong.