Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 2 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ jobs:
include:
- name: Windows
os: windows-latest
script: win
- name: Linux
os: ubuntu-latest
script: linux
- name: macOS (Intel)
os: macos-13
script: mac
- name: macOS (ARM)
os: macos-latest
script: mac
steps:
- name: Check out OpenCOR
uses: actions/checkout@v4
Expand All @@ -36,10 +32,10 @@ jobs:
node-version: 'lts/*'
- name: Install Yarn
run: npm install -g yarn
- name: Build OpenCOR
- name: Packages OpenCOR
run: |
yarn
yarn build:${{ matrix.script }}
yarn package
- name: Remove blockmap files
shell: bash
run: find ./dist -name '*.blockmap' -delete
Expand Down
33 changes: 11 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,17 @@ jobs:
node-version: 'lts/*'
- name: Install Yarn
run: npm install -g yarn
- name: Yarn install
- name: Install all of OpenCOR's dependencies
run: yarn
- name: Yarn format
run: |
yarn format
git diff --quiet
- name: Yarn lint
- name: Check that OpenCOR's code and OpenCOR's Web app's code are properly formatted
run: yarn format:check
- name: Lint OpenCOR's code and OpenCOR's Web app's code
run: yarn lint
- name: Yarn build
run: yarn build
- name: Yarn build:win (Windows only)
if: ${{ runner.os == 'Windows' }}
run: yarn build:win
- name: Yarn build:linux (Linux only)
if: ${{ runner.os == 'Linux' }}
run: yarn build:linux
- name: Yarn build:mac (macOS only)
if: ${{ runner.os == 'macOS' }}
run: yarn build:mac
- name: Yarn build:unpack
run: yarn build:unpack
- name: Yarn build:web
run: yarn build:web
- name: Yarn clean
- name: Type check OpenCOR's code
run: yarn typecheck
- name: Type check OpenCOR's Web app's code
run: yarn typecheck:web
- name: Package OpenCOR
run: yarn package
- name: Clean OpenCOR's environment
run: yarn clean
1 change: 1 addition & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Schema: https://json.schemastore.org/prettierrc

endOfLine: auto
printWidth: 120
semi: false
singleQuote: true
Expand Down
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
# OpenCOR

[OpenCOR](https://opencor.ws/) is a Web-based modelling environment, which can be used to organise, edit, simulate, and analyse [CellML](https://cellml.org/) files. It can be used both as a standalone application (on [Windows](https://en.wikipedia.org/wiki/Microsoft_Windows), [Linux](https://en.wikipedia.org/wiki/Linux), and [macOS](https://en.wikipedia.org/wiki/MacOS)) and on the Web.

## Prerequisites

To build OpenCOR, you need to install [node.js](https://nodejs.org/) and [npm](https://npmjs.com/), which you can do from [here](https://nodejs.org/en/download/package-manager). Then, you need to install [yarn](https://yarnpkg.com/), which you can do by running:

```bash
npm install -g yarn
```

## Scripts

Before doing anything, you need to install all of OpenCOR's dependencies:

```bash
yarn
```

Then, you can run a given script:

```bash
yarn <script>
```

where `<script>` is one of the following:

- `clean`: clean OpenCOR's environment;
- `dev`: start OpenCOR and OpenCOR's Web app in development mode;
- `dev:web`: start OpenCOR's Web app in development mode;
- `format`: format OpenCOR's code and OpenCOR's Web app's code;
- `format:check`: check that OpenCOR's code and OpenCOR's Web app's code are properly formatted;
- `lint`: lint OpenCOR's code and OpenCOR's Web app's code;
- `package`: (build and) package OpenCOR for the current platform;
- `package:linux`: (build and) package OpenCOR for Linux;
- `package:mac`: (build and) package OpenCOR for macOS;
- `package:win`: (build and) package OpenCOR for Windows;
- `publish:web`: publish OpenCOR's Web app on [npm](https://npmjs.com/);
- `start`: start OpenCOR in production mode;
- `start:web`: start OpenCOR's Web app in production mode;
- `typecheck`: type check OpenCOR's code; and
- `typecheck:web`: type check OpenCOR's Web app's code.
19 changes: 7 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,21 @@
"type": "module",
"version": "0.0.0",
"scripts": {
"build": "npm run typecheck && electron-vite build",
"build:linux": "npm run build && electron-builder --linux",
"build:mac": "npm run build && electron-builder --mac",
"build:unpack": "npm run build && electron-builder --dir",
"build:web": "(cd ./src/renderer && tsc && vite build)",
"build:win": "npm run build && electron-builder --win",
"clean": "rimraf dist node_modules out src/renderer/components.d.ts src/renderer/dist src/renderer/node_modules",
"debug": "electron-vite --inspect --sourcemap dev --watch",
"dev": "electron-vite dev --watch",
"dev:web": "(cd ./src/renderer && vite dev)",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"package": "electron-vite build && electron-builder",
"package:linux": "electron-vite build && electron-builder --linux",
"package:mac": "electron-vite build && electron-builder --mac",
"package:win": "electron-vite build && electron-builder --win",
"publish:web": "yarn publish ./src/renderer",
"start": "electron-vite preview",
"start:web": "(cd ./src/renderer && vite preview)",
"typecheck": "run-p typecheck:*",
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false",
"web": "(cd ./src/renderer && vite)"
"typecheck": "tsc --noEmit -p tsconfig.node.json --composite false",
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false"
},
"dependencies": {
"@electron-toolkit/preload": "^3.0.1",
Expand Down Expand Up @@ -67,7 +63,6 @@
"electron-vite": "^2.3.0",
"eslint": "^8.57.0",
"eslint-plugin-vue": "^9.28.0",
"npm-run-all2": "^6.2.3",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
Expand Down
50 changes: 2 additions & 48 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
dependencies:
color-convert "^2.0.1"

ansi-styles@^6.1.0, ansi-styles@^6.2.1:
ansi-styles@^6.1.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
Expand Down Expand Up @@ -3040,11 +3040,6 @@ json-buffer@3.0.1:
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==

json-parse-even-better-errors@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz#b43d35e89c0f3be6b5fbbe9dc6c82467b30c28da"
integrity sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==

json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
Expand Down Expand Up @@ -3271,11 +3266,6 @@ matcher@^3.0.0:
dependencies:
escape-string-regexp "^4.0.0"

memorystream@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2"
integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==

merge-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
Expand Down Expand Up @@ -3347,7 +3337,7 @@ minimatch@^5.0.1, minimatch@^5.1.0:
dependencies:
brace-expansion "^2.0.1"

minimatch@^9.0.0, minimatch@^9.0.3, minimatch@^9.0.4, minimatch@^9.0.5:
minimatch@^9.0.3, minimatch@^9.0.4, minimatch@^9.0.5:
version "9.0.5"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
Expand Down Expand Up @@ -3535,24 +3525,6 @@ normalize-url@^6.0.1:
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a"
integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==

npm-normalize-package-bin@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz#25447e32a9a7de1f51362c61a559233b89947832"
integrity sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==

npm-run-all2@^6.2.3:
version "6.2.3"
resolved "https://registry.yarnpkg.com/npm-run-all2/-/npm-run-all2-6.2.3.tgz#ea0c0987337b828eaa78c2f5488e70de0969917b"
integrity sha512-5RsxC7jEc/RjxOYBVdEfrJf5FsJ0pHA7jr2/OxrThXknajETCTYjigOCG3iaGjdYIKEQlDuCG0ir0T1HTva8pg==
dependencies:
ansi-styles "^6.2.1"
cross-spawn "^7.0.3"
memorystream "^0.3.1"
minimatch "^9.0.0"
pidtree "^0.6.0"
read-package-json-fast "^3.0.2"
shell-quote "^1.7.3"

npm-run-path@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
Expand Down Expand Up @@ -3749,11 +3721,6 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

pidtree@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c"
integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==

pify@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
Expand Down Expand Up @@ -3939,14 +3906,6 @@ read-cache@^1.0.0:
dependencies:
pify "^2.3.0"

read-package-json-fast@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz#394908a9725dc7a5f14e70c8e7556dff1d2b1049"
integrity sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==
dependencies:
json-parse-even-better-errors "^3.0.0"
npm-normalize-package-bin "^3.0.0"

readable-stream@^2.0.0, readable-stream@^2.0.5:
version "2.3.8"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b"
Expand Down Expand Up @@ -4171,11 +4130,6 @@ shebang-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==

shell-quote@^1.7.3:
version "1.8.1"
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680"
integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==

signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
version "3.0.7"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
Expand Down