@react95/cra-template 0.1.1 → 0.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/template/src/index.js +10 -3
- package/template/src/reportWebVitals.js +13 -0
- package/template.json +7 -7
- package/LICENSE +0 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react95/cra-template",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-alpha.0",
|
|
4
4
|
"description": "The official React95 template for Create React App.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"template.json"
|
|
19
19
|
],
|
|
20
20
|
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
21
|
+
"access": "public",
|
|
22
|
+
"provenance": true
|
|
22
23
|
},
|
|
23
24
|
"repository": {
|
|
24
25
|
"type": "git",
|
|
@@ -27,6 +28,5 @@
|
|
|
27
28
|
},
|
|
28
29
|
"bugs": {
|
|
29
30
|
"url": "https://github.com/React95/React95/issues"
|
|
30
|
-
}
|
|
31
|
-
"gitHead": "ce77184b22f46c18b61b45c59b80f69b68be3759"
|
|
31
|
+
}
|
|
32
32
|
}
|
package/template/src/index.js
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
3
|
import { ThemeProvider, GlobalStyle } from '@react95/core';
|
|
4
4
|
import { ClippyProvider } from '@react95/clippy';
|
|
5
5
|
|
|
6
6
|
import './index.css';
|
|
7
7
|
import App from './App';
|
|
8
8
|
import * as serviceWorker from './serviceWorker';
|
|
9
|
+
import reportWebVitals from './reportWebVitals';
|
|
9
10
|
|
|
10
|
-
ReactDOM.
|
|
11
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
12
|
+
|
|
13
|
+
root.render(
|
|
11
14
|
<ThemeProvider>
|
|
12
15
|
<GlobalStyle />
|
|
13
16
|
<ClippyProvider>
|
|
14
17
|
<App />
|
|
15
18
|
</ClippyProvider>
|
|
16
19
|
</ThemeProvider>,
|
|
17
|
-
document.getElementById('root'),
|
|
18
20
|
);
|
|
19
21
|
|
|
20
22
|
// If you want your app to work offline and load faster, you can change
|
|
21
23
|
// unregister() to register() below. Note this comes with some pitfalls.
|
|
22
24
|
// Learn more about service workers: https://bit.ly/CRA-PWA
|
|
23
25
|
serviceWorker.unregister();
|
|
26
|
+
|
|
27
|
+
// If you want to start measuring performance in your app, pass a function
|
|
28
|
+
// to log results (for example: reportWebVitals(console.log))
|
|
29
|
+
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
30
|
+
reportWebVitals();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const reportWebVitals = onPerfEntry => {
|
|
2
|
+
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
3
|
+
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
4
|
+
getCLS(onPerfEntry);
|
|
5
|
+
getFID(onPerfEntry);
|
|
6
|
+
getFCP(onPerfEntry);
|
|
7
|
+
getLCP(onPerfEntry);
|
|
8
|
+
getTTFB(onPerfEntry);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default reportWebVitals;
|
package/template.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": {
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@
|
|
5
|
-
"@testing-library/react": "^12.1.3",
|
|
6
|
-
"@testing-library/user-event": "^12.1.10",
|
|
7
|
-
"web-vitals": "^1.0.1",
|
|
8
|
-
"styled-components": "^5.1.0",
|
|
9
|
-
"@xstyled/styled-components": "^1.17.1",
|
|
4
|
+
"@react95/clippy": "latest",
|
|
10
5
|
"@react95/core": "latest",
|
|
11
6
|
"@react95/icons": "latest",
|
|
12
|
-
"@
|
|
7
|
+
"@testing-library/jest-dom": "^5.14.1",
|
|
8
|
+
"@testing-library/react": "^13.0.0",
|
|
9
|
+
"@testing-library/user-event": "^13.2.1",
|
|
10
|
+
"@xstyled/styled-components": "^3.6.0",
|
|
11
|
+
"styled-components": "^5.3.5",
|
|
12
|
+
"web-vitals": "^2.1.4"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
package/LICENSE
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Windows and all associated images are the property of the Microsoft Corp and are not covered by this license.
|
|
2
|
-
|
|
3
|
-
MIT License
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2018 React95
|
|
6
|
-
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
in the Software without restriction, including without limitation the rights
|
|
10
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
SOFTWARE.
|