Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Migrate CootWorker to TS #375

Merged
merged 8 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -576,3 +576,4 @@ tests/test.log
.gitignore
baby-gru/moorhen-0.1.0.tgz
baby-gru/copyForDist.sh
baby-gru/public/baby-gru/CootWorker.js
1 change: 1 addition & 0 deletions baby-gru/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ yarn-error.log*
/public/baby-gru/wasm
/public/baby-gru/tutorials/moorhen-tutorial-map-number-1.mtz
/public/baby-gru/tutorials/moorhen-tutorial-structure-number-1.pdb
baby-gru/public/baby-gru/CootWorker.js
/src/WebGL
/monomers
/package-lock.json
18 changes: 10 additions & 8 deletions baby-gru/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,21 @@
"web-vitals": "^2.1.4"
},
"scripts": {
"transpile-ts-worker": "npx tsc --module es2015 --lib webworker --skipLibCheck public/baby-gru/CootWorker.ts && sed -i '/export {}/d' public/baby-gru/CootWorker.js",
"prestart": "npm run transpile-ts-worker",
"start": "react-scripts start",
"start-tsc": "npx nodemon --trace-warnings",
"build": "react-scripts build",
"build-cloud-dev": "webpack --mode development --devtool inline-source-map",
"build-cloud": "webpack --mode production",
"build": "npm run transpile-ts-worker && react-scripts build",
"build-npm-registry": "npm run transpile-ts-worker && webpack --mode development --devtool inline-source-map --env destination='npmRegistry'",
"build-cloud-dev": "npm run transpile-ts-worker && webpack --mode development --devtool inline-source-map --env destination='ccp4Cloud'",
"build-cloud": "npm run transpile-ts-worker && webpack --mode production --env destination='ccp4Cloud'",
"test": "react-scripts test",
"eject": "react-scripts eject",
"dev": "concurrently -k \"BROWSER=none npm start\" \"npm:electron\"",
"electron": "wait-on tcp:3000 && electron-forge start",
"package": "react-scripts build && electron-forge package",
"make-mac": "react-scripts build && electron-forge make --platform darwin",
"make-linux": "react-scripts build && electron-forge make --platform linux",
"make-win32": "react-scripts build && electron-forge make --platform win32"
"package": "npm run build && electron-forge package",
"make-mac": "npm run build && electron-forge make --platform darwin",
"make-linux": "npm run build && electron-forge make --platform linux",
"make-win32": "npm run build && electron-forge make --platform win32"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here @stuartjamesmcnicholas I create a script transpile-ts-worker that transpiles the worker TS file. The script is called in npm run build, which in turn is invoked in make-mac, make-win32...etc.

},
"eslintConfig": {
"extends": [
Expand Down
Loading