Skip to content

hshsl-training/outreach-toolkit

Repository files navigation

HSHSL Outreach Toolkit

About

This is a desktop app (for Windows and Mac) that lets communications staff:

  • Preview submissions to The Elm and Campus Life Weekly before submitting
  • Quickly get campus digital display templates and information

Download for Windows | Download for Mac


Development docs

The app is built with HTML, CSS, and JavaScript using Electron. See package.json for app dependencies and build scripts, and index.js for app configuration.

Current development workflow:
  1. This is a Jekyll site which compiles static html files to _site/. (_site/ is not available in the GitHub repo because of .gitignore. You will see it locally once you build the site for the first time.) Vue.js is used for the preview user interface.
  2. Electron watches _site/ to build a local desktop app for development.
  3. electron-packager builds app binaries for distribution.
Environment dependencies:
  • Jekyll is a Ruby gem.
  • Everything Electron related is a Node.js module.
Development set up:

First clone, then navigate into, this directory.

Next, install the js dependencies:

> npm install

Then build the static site with jekyll:

> jekyll build --watch

Then, in a new terminal tab, start electron:

> npm start
Build binaries:

Using electron-packager to package this web app into OS-specific bundles (.exe and .app) takes the following form:

> electron-packager <sourcedir> <appname> --platform=<platform> --arch=<arch> [optional flags...]

Note: Building for Windows from non-Windows platforms requires Wine.🍷

When ready to build binary app bundles for distribution:

# build for all platforms
> electron-packager . --all

# build for Windows
> electron-packager . --platform=win32

# build for Mac
> electron-packager . --platform=darwin

# build for Win and Mac
> electron-packager . --platform='win32,darwin'

# build with overwrite
> electron-packager . --platform=win32 --overwrite