Openstad-event-planner — Event planner for Openstad
As seen on Midzomer Mokum
IMPORTANT This package requires API changes.
Install the package into your openstad-frontend application
$ npm install --save @savvycodes/openstad-event-planner-widgets
Activate the content widget:
// packages/cms/config/contentWidgets.js
const contentWidgets = {
'@savvycodes/openstad-event-planner': {
adminOnly: true,
},
};
Enable the module in openstad-frontend by adding a modules
key to index.js
and modules.js
:
// openstad-frontend/index.js
var apos = openstadCms.site({
bundles: ['@openstad/cms'],
// See lib/modules for basic project-level configuration of our modules
// responsible for serving static assets, managing page templates and
// configuring user accounts.
modules: {
+ '@savvycodes/openstad-event-planner-widgets': {},
},
});
// openstad-frontend/modules.js
module.exports.default = {
bundles: ['@openstad/cms'],
// See lib/modules for basic project-level configuration of our modules
// responsible for serving static assets, managing page templates and
// configuring user accounts.
modules: {
+ '@savvycodes/openstad-event-planner-widgets': {},
},
};
It's important to also add this declaration in modules.js
for the apostrophe build system to pick up this module.
NOTE This a work-in-progress
- 🧑💼 event-manager – React component to manage events in the openstad frontend ("voor aanbieders")
- 🎉 event-overview – React component to view events in the openstad frontend ("activiteiten overzicht")
- 🌍 openstad-event-planner-widgets – Apostrophe CMS module that bundles the React components
You can use your local version of openstad-event-planner/browser-widgets and attach it to your running openstad-frontend instance. To do this, first build the package you want to link (cd into packages/openstad-event-planner-widgets) and then use npm link.
In openstad-frontend, first install all dependencies using npm install. Afterwards run 'npm link @savvycodes/openstad-event-planner-widgets'. Rerun the frontend and you should see your local version. Do take note that without a watcher, you will need to rebuild the dependency each time a change to it is made.
You can use lerna to publish a new version to npm, for now this is done manually
$ npx lerna publish