Skip to content

Commit 1154da2

Browse files
committed
NCL-8490 Migrate CRA to vite
1 parent b71f9c1 commit 1154da2

30 files changed

+3024
-20318
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
# production
1616
/build
17+
/dist
18+
/dist-ssr
1719

1820
# misc
1921
.DS_Store

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
build
3+
dist
34
package-lock.json
4-
.husky
5+
.husky

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Bootstrapping
44

5-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). Too see more details about bootstrapping, open [documentation/bootstrapping.md](./documentation/bootstrapping.md)
5+
This project was bootstrapped with [vite](https://vite.dev/). Too see more details about bootstrapping, open [documentation/bootstrapping.md](./documentation/bootstrapping.md)
66

77
## Changelog
88

@@ -22,8 +22,6 @@ Preferred code editor is `Visual Studio Code`. Settings config file is also incl
2222

2323
Contribute using [GitHub flow](https://guides.github.com/introduction/flow/), once new Pull request is created, [GitHub Workflows](https://github.com/project-ncl/pnc-web-ui-react/tree/main/.github/workflows) are started and jobs consisting of building and testing are executed.
2424

25-
To see more details about scripts added by Create React App, open [documentation/README_CRA.md](./documentation/README_CRA.md).
26-
2725
First prepare project locally:
2826

2927
```bash

documentation/README_CRA.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

documentation/bootstrapping.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
11
# How this project was bootstrapped
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
This project was bootstrapped with [vite](https://vite.dev/).
44

55
## Tool versions when bootstrapping
66

77
```bash
8-
node -v && npm -v && npx -v && npx create-react-app --version && git --version
9-
10-
# output:
11-
v14.17.0
12-
7.17.0
13-
7.17.0
14-
4.0.3
15-
git version 2.31.1
16-
```
17-
18-
## Create React App bootstrapping
19-
20-
```bash
21-
npx create-react-app pnc-web-ui-react --template typescript --use-npm
8+
node -v && npm -v && npx -v && npx vite --version && git --version
229
```

index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta name="description" content="Project New Castle Web UI" />
9+
<!-- load PNC Web Config from Orch -->
10+
<script type="text/javascript" src="%VITE_PNC_WEB_CONFIG_JS%/pnc-web-config/config.js"></script>
11+
<script type="text/javascript" src="%VITE_KEYCLOAK_URL%/js/keycloak.js"></script>
12+
<!--
13+
manifest.json provides metadata used when your web app is installed on a
14+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
15+
-->
16+
<link rel="manifest" href="manifest.json" />
17+
<title>Newcastle Build System</title>
18+
</head>
19+
<body>
20+
<noscript>You need to enable JavaScript to run this app.</noscript>
21+
<div id="root"></div>
22+
<script type="module" src="/src/index.tsx"></script>
23+
</body>
24+
</html>

0 commit comments

Comments
 (0)