Skip to content

savvycodes/openstad-event-planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Openstad-event-planner — Event planner for Openstad

As seen on Midzomer Mokum

Installation

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.

Development

NOTE This a work-in-progress

Packages

  • 🧑‍💼 event-managerReact component to manage events in the openstad frontend ("voor aanbieders")
  • 🎉 event-overviewReact component to view events in the openstad frontend ("activiteiten overzicht")
  • 🌍 openstad-event-planner-widgetsApostrophe CMS module that bundles the React components

Linking in development

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.

Publishing

You can use lerna to publish a new version to npm, for now this is done manually

$ npx lerna publish