Skip to content

Commit e23db06

Browse files
Merge pull request #34 from NeuroJSON/dev_hari
All changes from Hari and Elaine
2 parents bb4afca + cd8a0e8 commit e23db06

19 files changed

+5514
-485
lines changed

.github/workflows/build-deploy-zodiac.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
jobs:
1313
deploy:
1414
runs-on: ubuntu-22.04
15+
env:
16+
CI: false
1517

1618
steps:
1719
- name: Check out the repository
@@ -28,6 +30,11 @@ jobs:
2830
run: |
2931
echo "Building for /dev/${{ env.BRANCH_NAME }}/"
3032
PUBLIC_URL="/dev/${{ env.BRANCH_NAME }}/" yarn build
33+
34+
- name: Copy JS libraries (jdata, bjdata etc.)
35+
run: |
36+
mkdir -p build/js
37+
cp -r public/js/* build/js/
3138
3239
- name: Copy package to server
3340
uses: NeuroJSON/[email protected]

.github/workflows/validate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
validate:
1010
runs-on: ubuntu-latest
11+
env:
12+
CI: false
1113

1214
steps:
1315
- name: Check out the repository

build-log.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
yarn run v1.22.22
2+
$ craco build --debug
3+
Creating an optimized production build...
4+
Compiled with warnings.
5+
6+
Critical dependency: the request of a dependency is an expression
7+
8+
Search for the keywords to learn more about each warning.
9+
To ignore, add // eslint-disable-next-line to the line before.
10+
11+
File sizes after gzip:
12+
13+
717.18 kB build/static/js/main.30f0cad2.js
14+
15+
The bundle size is significantly larger than recommended.
16+
Consider reducing it with code splitting: https://goo.gl/9VhYWB
17+
You can also analyze the project dependencies: https://goo.gl/LeUzfb
18+
19+
The project was built assuming it is hosted at /.
20+
You can control this with the homepage field in your package.json.
21+
22+
The build folder is ready to be deployed.
23+
You may serve it with a static server:
24+
25+
yarn global add serve
26+
serve -s build
27+
28+
Find out more about deployment here:
29+
30+
https://cra.link/deployment
31+
32+
Done in 15.95s.

craco.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
webpack: {
3+
configure: (webpackConfig) => {
4+
webpackConfig.resolve.fallback = {
5+
...webpackConfig.resolve.fallback,
6+
path: require.resolve("path-browserify"),
7+
};
8+
9+
webpackConfig.module.rules.push({
10+
test: /\.js$/,
11+
parser: {
12+
requireEnsure: false, // Prevents Webpack from treating require() as a critical dependency
13+
},
14+
});
15+
16+
webpackConfig.ignoreWarnings = [/the request of a dependency is an expression/];
17+
18+
return webpackConfig;
19+
},
20+
},
21+
};

package.json

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"3d-force-graph": "^1.73.4",
77
"@babel/helpers": "7.26.10",
88
"@babel/runtime": "7.26.10",
9+
"@craco/craco": "^7.1.0",
910
"@emotion/react": "^11.11.1",
1011
"@emotion/styled": "^11.11.0",
1112
"@mui/icons-material": "^5.14.3",
@@ -17,19 +18,30 @@
1718
"@types/jest": "^27.0.1",
1819
"@types/react": "^18.0.0",
1920
"@types/react-dom": "^18.0.0",
20-
"@types/three": "^0.169.0",
21-
"axios": "1.8.2",
21+
"@types/three": "^0.174.0",
22+
"ajv": "^8",
23+
"ajv-keywords": "^5",
24+
"axios": "^1.4.0",
25+
"bda": "^1.0.0",
26+
"bjd": "^0.3.2",
27+
"buffer": "^6.0.3",
2228
"dayjs": "^1.11.10",
29+
"jda": "^0.4.0",
30+
"jquery": "^3.7.1",
31+
"json-stringify-safe": "^5.0.1",
2332
"jwt-decode": "^3.1.2",
33+
"path-browserify": "^1.0.1",
2434
"query-string": "^8.1.0",
2535
"react": "^18.2.0",
2636
"react-dom": "^18.2.0",
2737
"react-json-view": "^1.21.3",
2838
"react-redux": "^8.1.2",
2939
"react-router-dom": "^6.15.0",
3040
"react-scripts": "^5.0.1",
31-
"three": "^0.169.0",
41+
"sharp": "^0.33.5",
42+
"stats-js": "^1.0.1",
3243
"typescript": "^5.1.6",
44+
"uplot": "^1.6.31",
3345
"web-vitals": "^2.1.0"
3446
},
3547
"devDependencies": {
@@ -49,10 +61,10 @@
4961
"prettier": "^2.3.1"
5062
},
5163
"scripts": {
52-
"start": "react-scripts start",
53-
"build": "react-scripts build",
54-
"test": "react-scripts test",
55-
"eject": "react-scripts eject",
64+
"start": "craco start || react-scripts start",
65+
"build": "craco build || react-scripts build",
66+
"test": "craco test || react-scripts test",
67+
"eject": "craco eject || react-scripts eject",
5668
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}' --ext .js,.jsx,.ts,.tsx"
5769
},
5870
"browserslist": {

public/index.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,37 @@
5050
/> -->
5151

5252
<title>NeuroJSON.io - Free Data Worth Sharing</title>
53+
<link rel="stylesheet" href="https://leeoniya.github.io/uPlot/dist/uPlot.min.css" />
54+
<style>
55+
#chartpanel {
56+
background-color: #707070;
57+
padding: 10px;
58+
display: block;
59+
margin-top: 20px;
60+
border-radius: 10px;
61+
}
62+
63+
#chartpanel h4 {
64+
padding-top: 0;
65+
margin-bottom: 10px;
66+
color: black;
67+
}
68+
69+
#chartpanel a.closebtn {
70+
float: right;
71+
font-size: 28px;
72+
font-weight: bold;
73+
color: yellow;
74+
text-decoration: none;
75+
margin-top: -10px;
76+
}
77+
78+
.uplot {
79+
margin: auto;
80+
max-width: 100%;
81+
}
82+
</style>
83+
5384
</head>
5485
<body>
5586
<noscript>You need to enable JavaScript to run this app.</noscript>
@@ -64,5 +95,19 @@
6495
To begin the development, run `npm start` or `yarn start`.
6596
To create a production bundle, use `npm run build` or `yarn build`.
6697
-->
98+
<!-- ✅ Global Script Dependencies -->
99+
<script src="https://unpkg.com/jquery"></script>
100+
<script src="%PUBLIC_URL%/js/jsonview.js"></script>
101+
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.145.0/three.min.js"></script>
102+
<script src="https://unpkg.com/[email protected]/build/stats.min.js"></script>
103+
<script src="https://cdnjs.cloudflare.com/ajax/libs/numjs/0.16.0/numjs.min.js"></script>
104+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.11/pako.min.js"></script>
105+
<script src="%PUBLIC_URL%/js/js_lzma.js"></script>
106+
<script src="%PUBLIC_URL%/js/js_lzma_shim.js"></script>
107+
<script src="%PUBLIC_URL%/js/jdata.js"></script>
108+
<script src="%PUBLIC_URL%/js/bjdata.js"></script>
109+
<script src="https://bundle.run/[email protected]"></script>
110+
<script>var buffer_module = buffer;</script>
111+
<script src="https://leeoniya.github.io/uPlot/dist/uPlot.iife.min.js"></script>
67112
</body>
68113
</html>

0 commit comments

Comments
 (0)