NOTE: As of May 2022, this repository is currently non-functional due to a backend change in the www repository. This repository may or may not be updated in the future to accommodate those changes.
This eBlast generator provides a quick and easy solution to semi-automatiaclly creating monthly eBlasts for Raritan Public Library.
First, download or clone the latest version of this repository. Once you have the repository downloaded in a suitable location, run the following commands to check to make sure you have Node.js and npm installed.
node --version
npm --version
Then, run the following command to install the necessary npm packages.
npm install
By default, eBlasts will be generated using the latest commit to the main branch of the www repository. Relevant data from the events.yaml and news.yaml files will be extracted and parsed to be injected into the contents of the eBlast.
npm run dev
This command starts up the development server. You may have to refresh cache (CTRL+F5) for new changes to take effect. You can also run npm run redev to clear cache when starting the development server, which is useful for when Parcel's hot reloading feature breaks (this is especially problematic with stylesheets).
NOTE: When running a development server, the src/main.styl file is modified to apply certain stylesheet properties to the eBlast. This should automatically reset to normal after the server is shut down, but please make sure that the file remains unchanged from its original state if you did not modify it.
It is required that you keep the development server running while this process takes place.
npm run make
This command generates the eBlast and saves the resulting .pdf file in the out directory.
Pull requests are encouraged by the Raritan Public Library to ensure our software is of the highest quality possible. If you would like to suggest major changes or restructuring of this repository, please open an issue. It is also strongly suggested you email us at info@raritanlibray.org with any additional questions or concerns.