Skip to content

Developer Workflow

Daniel Weck edited this page Apr 30, 2020 · 19 revisions

Dependencies

The source code for the latest ace-gui release is tagged as v1.1.1. Under the hood, the latest version of Ace is used (v1.2-beta.x, which is published as an NPM package).

Technologies

Prerequisites

Preflight

At the moment, Ace App depends on a special branch of the Ace core project, instead of the official NPM packages (see the above Dependencies section). The following steps are therefore necessary:

  • cd MY_ACE_FOLDER (choose your folder name / filesystem location)
  • git clone https://github.com/daisy/ace.git
  • cd ace
  • git checkout ace-next-local-packs (this branch corresponds to this Pull Request)
  • yarn ace-app-prepare
  • yarn test-all

Build, Run, Package

  • cd MY_ACE_FOLDER (same filesystem location as specified in the above Preflight section)
  • git clone https://github.com/daisy/ace-gui.git
  • cd ace-gui
  • git checkout master
  • git submodule init && git submodule update (this sets up the DAISY Knowledge Base Git submodule)
  • rm -rf node_modules (this is really only needed if yarn install was already invoked)
  • rm yarn.lock (this is necessary to reset the file paths of the local NPM dependencies)
  • yarn cache clean (this is an optional, but strongly-recommended step, as local packages are cached too)
  • yarn install
  • git status && git --no-pager diff (this should show yarn.lock changes)
  • yarn clean
  • yarn start:dev (launches the app after compiling in development mode, with a file watcher)
  • yarn start:dev_ (launches the app after compiling in development mode, no file watcher)
  • yarn start:prod (launches the app after compiling in production mode, no file watcher)
  • yarn start (launches the app without compilation, so requires prior manual invokation of yarn build:prod or yarn build:dev)
  • yarn package:linux (creates the Linux distributable Debian package and AppImage)
  • yarn package:win (creates the Windows NSIS installer, currently unsigned)
  • yarn package:mac (creates the MacOS DMG installer, requires the DAISY EV Code Signing Certificate and invokes the Apple Notarization process)
  • yarn package:mac:skip-notarization (skips Apple's Notarization)
  • yarn package:mac:dev (skips Apple's Notarization, development build with React + Redux web inspectors etc.)
  • yarn package:linux:dev (development build with React + Redux web inspectors etc.)
  • yarn package:win:dev (development build with React + Redux web inspectors etc.)
  • yarn package:mac:dev (development build with React + Redux web inspectors etc.)

Dependency Maintenance

  • ncu is recommended to discover out of date NPM packages, and to subsequently yarn upgrade or rm -rf node_modules && rm yarn.lock && yarn install (which, in both cases, will update yarn.lock to match frozen versions of the latest available and approved dependencies). Use -x @types/node to skip specific comma-separated packages.
  • npm-check is a useful alternative / complement to ncu. Use --ignore @types/node to skip specific packages. Use npm-check --skip-unused --no-emoji for cleaner shell output.
  • david is a useful alternative / complement to ncu. The online service can be helpful too: https://david-dm.org/daisy/ace?type=dev
  • yarn outdated / npm outdated also helps :)

Localization (Translations)

Please visit this dedicated wiki page to learn more about how language resources are created and maintained.

Release Tagging

  • A useful command to ensure the date/time of the Git tag is the same as the last Git commit in the master branch:
GIT_COMMITTER_DATE="$(git show master --format=%aD | head -1)" \
git tag -a "v1.0.0" master -m "tag v1.0.0" \
&& git push --tags origin master \
&& git tag --list --format='%(refname)   %(taggerdate)'
  • Quick reminder of how to delete an erroneous tag (local and remote removal): git tag -d v1.0.0 && git push origin :refs/tags/v1.0.0
Clone this wiki locally