electron-reactive-event / Examples / Sample Project
Sample Project
Purpose
A sample project is presented herein, which demonstrates each feature provided by electron-reactive-event. The project is also configured to use the CLI.
In this article
A sample project is provided for demonstration. This project was used throughout development, and showcases each feature—that is, every overload of every function is used at least once, using nontrivial event declarations.
How to Run the Sample
The sample project is hosted in the SorrellWm monorepo (as are electron-reactive-event and electron-reactive-event-cli). This monorepo structure precludes the use of tools like degit as an easy way to download the sample project.
Download via the CLI
To make this process easier, the CLI provides a command to download the sample project,
npx electron-reactive-event-cli download-sampleThis command will download the project in the working directory, at path ./electron-reactive-event-sample.
From there,
cd electron-reactive-event-sample
npm install
npm run start Tip: The --run flag.
Run the above CLI command with the --run flag to download the project and run the above three commands.
That is, use
npx electron-reactive-event-cli download-sample --runfor a fully automated process.
Download Manually
Understandably, some may not want to use an unfamiliar npm script to download and run a project for them. The sample project may be downloaded by cloning the SorrellWm monorepo,
git clone https://github.com/GageSorrell/SorrellWmThe remaining steps are nearly identical to the above,
cd SorrellWm/Development/ElectronReactiveEventSample
npm install
npm run start