Skip to content

Commit

Permalink
Made watch also specific for browser and electron and updated README.
Browse files Browse the repository at this point in the history
Added Docker packaging in README.
  • Loading branch information
harmen-xb committed Nov 25, 2024
1 parent 9070e2f commit 2a0e3bb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ Currently there is still an issue where new files are not recognized automatical

## Developing

Start watching all packages, including `electron-app`, of your application with
Start watching all packages of your application for either browser or electron version.

yarn watch
yarn watch:browser

_or_

yarn watch:electron

_or_ watch only specific packages with

Expand Down Expand Up @@ -81,11 +85,30 @@ Short steps:

## Packaging

To package the application use
We package CrossModel either for the browser (Docker) or desktop application (Electron).

### Docker

To package the web application we build a docker image. There are currently two Dockerfile definitions, one based on [Alpine Linux](./Dockerfile) and one based on [Ubuntu](./Dockerfile.ubuntu). Some users might prefer Ubuntu over Alpine as based, which is why we have both options.

To create the Alpine based image, execute the following command:

docker build -t crossmodel:0.0.0-alpine -f .\Dockerfile .

To create the Ubuntu based image, execute the following command:

docker build -t crossmodel:0.0.0-ubuntu -f .\Dockerfile.ubuntu .

In the main build action we build and publish the Alpine version.

### Electron

To package CrossModel as a desktop application, execute the following command:

yarn theia:electron package

Depending on the platform, this will produce an executable or an installer for the application under `applications/electron-app/dist`.

Details about the packaging can be configured in `applications/electron-app/electron-builder.yml`.

## Structure
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"theia:bundle": "yarn theia:electron bundle && yarn theia:browser bundle",
"theia:electron": "yarn --cwd applications/electron-app",
"ui-test": "yarn --cwd e2e-tests ui-test",
"watch": "lerna run --parallel watch"
"watch:browser": "lerna run --parallel --ignore=\"applications/electron-app\" watch",
"watch:electron": "lerna run --parallel --ignore=\"applications/browser-app\" watch"
},
"devDependencies": {
"@testing-library/react": "^11.2.7",
Expand Down

0 comments on commit 2a0e3bb

Please sign in to comment.