@rcsb/rcsb-documentation 0.0.1 → 0.0.2
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/build/bundle.js +2 -0
- package/build/bundle.js.LICENSE.txt +51 -0
- package/build/index.html +1 -1
- package/build/static/js/main.a51206b6.js.map +1 -1
- package/package.json +15 -11
- package/src/index.js +0 -48
package/package.json
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rcsb/rcsb-documentation",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"main": "
|
|
4
|
+
"version": "0.0.02",
|
|
5
|
+
"main": "build/bundle.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"build"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {
|
|
10
|
+
"node-fetch": "^3.3.2",
|
|
10
11
|
"react": "^18.3.1",
|
|
11
12
|
"react-dom": "^18.3.1",
|
|
12
|
-
"react-router-dom": "^6.25.1"
|
|
13
|
-
"react-scripts": "^5.0.1"
|
|
13
|
+
"react-router-dom": "^6.25.1"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"start": "
|
|
17
|
-
"build": "
|
|
18
|
-
"
|
|
19
|
-
"test": "react-scripts test",
|
|
20
|
-
"eject": "react-scripts eject"
|
|
16
|
+
"start": "webpack serve --mode development",
|
|
17
|
+
"build": "webpack --mode production",
|
|
18
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
21
19
|
},
|
|
22
20
|
"eslintConfig": {
|
|
23
21
|
"extends": [
|
|
@@ -38,10 +36,16 @@
|
|
|
38
36
|
]
|
|
39
37
|
},
|
|
40
38
|
"devDependencies": {
|
|
39
|
+
"@babel/core": "^7.25.2",
|
|
41
40
|
"@babel/plugin-transform-modules-commonjs": "^7.24.7",
|
|
41
|
+
"@babel/preset-env": "^7.25.4",
|
|
42
|
+
"@babel/preset-react": "^7.24.7",
|
|
43
|
+
"babel-loader": "^9.1.3",
|
|
42
44
|
"css-loader": "^7.1.2",
|
|
43
|
-
"
|
|
45
|
+
"html-webpack-plugin": "^5.6.0",
|
|
44
46
|
"style-loader": "^4.0.0",
|
|
45
|
-
"webpack
|
|
47
|
+
"webpack": "^5.94.0",
|
|
48
|
+
"webpack-cli": "^5.1.4",
|
|
49
|
+
"webpack-dev-server": "^5.1.0"
|
|
46
50
|
}
|
|
47
51
|
}
|
package/src/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
|
4
|
-
import routes from './routes';
|
|
5
|
-
import ErrorBoundary from './components/ErrorBoundary';
|
|
6
|
-
|
|
7
|
-
const NotFound = () => (
|
|
8
|
-
<div>
|
|
9
|
-
Oops, looks like this page is not exist. Try going back to the homepage.
|
|
10
|
-
</div>
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
const AppContent = () => {
|
|
14
|
-
return (
|
|
15
|
-
<main className="doc-container mt-5">
|
|
16
|
-
<Routes>
|
|
17
|
-
{routes.map((route, index) => (
|
|
18
|
-
<Route
|
|
19
|
-
key={index}
|
|
20
|
-
path={route.path}
|
|
21
|
-
element={route.element}
|
|
22
|
-
/>
|
|
23
|
-
))}
|
|
24
|
-
<Route path="*" element={<NotFound />} />
|
|
25
|
-
</Routes>
|
|
26
|
-
</main>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//Set the global variable for basename
|
|
31
|
-
const basename =window.__DOCUMENTATION_BASEROUTE__ || '';
|
|
32
|
-
const App = () => {
|
|
33
|
-
return (
|
|
34
|
-
<ErrorBoundary>
|
|
35
|
-
<Router basename={basename}>
|
|
36
|
-
<AppContent />
|
|
37
|
-
</Router>
|
|
38
|
-
</ErrorBoundary>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
43
|
-
root.render(
|
|
44
|
-
<React.StrictMode>
|
|
45
|
-
<App basename={basename} />
|
|
46
|
-
</React.StrictMode>
|
|
47
|
-
);
|
|
48
|
-
|