-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* refactor: use vite as dev tool chore: remove unused deps * build: change outDir scripts: add build&serve * spec node version * chore: add proxy redirect chore: remove old index.html * try fix heroku * Revert "try fix heroku" This reverts commit aa42f99. * host from /client * chore: set base by different commands chore: make antd.less only include once * chore: clean up * chore: add peer deps * chore: up deps * chore: up deps * chore: remove unused js lib doc: add doc on vite config * chore: up react 18 chore: remove unused deps * chore: up vite * docker: base path based on env * chore: enable gzip * add preload to js * preload more asset * use brotil again * up quality * return to gzip Co-authored-by: mikelxk <[email protected]> Co-authored-by: Siyu Chen <[email protected]>
- Loading branch information
Showing
78 changed files
with
1,954 additions
and
12,257 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,4 +1,5 @@ | ||
FROM strapi/base | ||
FROM node:14 | ||
|
||
WORKDIR /usr/src/app/client | ||
COPY ./client/package.json . | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="casmm-icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<meta | ||
name="description" | ||
content="Computation and Science Modeling through Making" | ||
/> | ||
<link rel="apple-touch-icon" href="/logo192.png" /> | ||
<!-- | ||
manifest.json provides metadata used when your web app is installed on a | ||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ | ||
--> | ||
<link rel="manifest" href="/manifest.json" /> | ||
<link rel="preload" as="script" href="/lib/blockly_compressed.js"> | ||
<link rel="preload" as="script" href="/lib/avrgirl-arduino.global.js"> | ||
<link rel="preload" as="script" href="/lib/blocks_compressed.js"> | ||
<link rel="preload" as="script" href="/lib/javascript_compressed.js"> | ||
<link rel="preload" as="script" href="/lib/en.js"> | ||
<title>CaSMM</title> | ||
<!--libraries for style--> | ||
<link | ||
rel="stylesheet" | ||
href="https://use.fontawesome.com/releases/v5.9.0/css/all.css" | ||
/> | ||
<!-- libraries for blockly --> | ||
<!-- depreciated comes first as the other files may depend on it--> | ||
<script src="/lib/depreciated.js"></script> | ||
<script src="/lib/blockly_compressed.js"></script> | ||
<script src="/lib/blocks_compressed.js"></script> | ||
<script src="/lib/en.js"></script> | ||
<!-- here are the libraries to get code from the blocks --> | ||
<script src="/lib/arduino_compressed.js"></script> | ||
<script src="/lib/javascript_compressed.js"></script> | ||
<script src="/lib/avrgirl-arduino.global.js"></script> | ||
<script> | ||
const global = globalThis | ||
</script> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="./src/index.jsx"></script> | ||
</body> | ||
</html> |
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 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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
@import '~antd/dist/antd.less'; | ||
|
||
|
||
#colors() { | ||
primary: #3D5C82; | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
@import 'antd/dist/antd.less'; | ||
@import './assets/style.less'; | ||
|
||
body { | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import react from "@vitejs/plugin-react" | ||
import { defineConfig } from "vite" | ||
|
||
const base = process.env.PUBLIC_URL ?? "/" | ||
|
||
export default defineConfig({ | ||
css: { | ||
preprocessorOptions: { | ||
less: { | ||
modifyVars: { | ||
"@primary-color": "#3d5c82", // primary color for all components | ||
"@link-color": "#3d5c82", // link color | ||
"@success-color": "#52c41a", // success state color | ||
"@warning-color": "#faad14", // warning state color | ||
"@error-color": "#f5222d", // error state color | ||
"@font-size-base": "14px", // major text font size | ||
"@heading-color": "rgba(0, 0, 0, 0.85)", // heading text color | ||
"@text-color": "rgba(0, 0, 0, 0.65)", // major text color | ||
"@text-color-secondary": "rgba(0, 0, 0, 0.45)", // secondary text color | ||
"@disabled-color": "rgba(0, 0, 0, 0.25)", // disable state color | ||
"@border-radius-base": "4px", // major border radius | ||
"@border-color-base": "#d9d9d9", // major border color | ||
"@box-shadow-base": "0 2px 8px rgba(0, 0, 0, 0.15)", // major shadow for layers | ||
}, | ||
javascriptEnabled: true, | ||
}, | ||
}, | ||
}, | ||
//in build mode, the output will be copoied to server/puiblic/client | ||
base, | ||
plugins: [react()], | ||
server: { | ||
port: 3000, | ||
proxy: { | ||
"/api": { | ||
target: "http://localhost:1337", | ||
}, | ||
}, | ||
}, | ||
build: { | ||
outDir: "build", | ||
}, | ||
}) |
Oops, something went wrong.