Home

Awesome

Digital Paper Edit - Electron app

Electron Cross Platform Desktop app

---> Work in progress <--

For a ready to use release of the desktop application, checkout the user manual for more details on how to get started.

See here for overall project architecture info

Github project board (for my forks) - across linked repos

Setup

<!-- _stack - optional_ _How to build and run the code/app_ -->
git clone git@github.com:bbc/digital-paper-edit-electron.git
cd digital-paper-edit-electron

Optional step to setup nvm to use node version 10, otherwise just use node version 10

nvm use || nvm install`

in root of project

npm install

Usage

npm start

System Architecture

<!-- _High level overview of system architecture_ -->

Electron Cross platform desktop app

Development env

<!-- _How to run the development environment_ _Coding style convention ref optional, eg which linter to use_ _Linting, github pre-push hook - optional_ -->

Node version is set in node version manager .nvmrc

Build

<!-- _How to run build_ --> <!-- TODO: needs to pull in React front end from npm. eg how it was done in Makefile before build-electron: build-react @echo "Electron build" # does areact-build # clears build folder inside of electron rm -rf ./packages/electron/build rm -rf ./packages/electron/dist # then copies the react build folder into electron folder cp -a ./packages/client/build ./packages/electron/build # build/package electron for mac, wind and linux cd ./packages/electron && npm run build:mwl and then run ``` npm run build:mwl ``` -->

TBC

Tests

TBC

Deployment

<!-- _How to deploy the code/app into test/staging/production_ -->

We use Github actions to build. And add new versions to github releases. Every time a new commit to master is pushed with a version tag.

  1. Update the version in your project's package.json file (e.g. 1.2.3)
  2. Commit that change (git commit -m"1.2.3" -m"optional message")
  3. Tag your commit (git tag 1.2.3). Make sure your tag name's format is *.*.*.
    1. Your workflow will use this tag to detect when to create a release
  4. Push your changes to GitHub (git push && git push origin v1.2.3)
<!-- Probably through Travis or Circle CI -->

Running a local electron build

However if you want to run a build and package the app locally you can use the npm scripts

<details> <summary>Instructions for funning a local electron build</summary>

To build for mac, windows, and linux

npm run build:mwl

To build for mac only

npm run build:m

To build for windows only

npm run build:w

To build for linux only

npm run build:l

The build, packaged app will be in the /dist folder.

</details>