Ghost/ghost/member-events
Hannah Wolfe b80b90229f Added consistent linting pattern to all packages
refs: https://github.com/TryGhost/Toolbox/issues/188

- some of our older packages used a pattern for linting which missed using test config for linting tests
- we need this to be consistent so that we can add more eslint rules for testing
- two packages also didn't use the lib pattern, which made the lint pattern error - so this was fixed as well
2023-06-13 10:43:29 +01:00
..
lib Added eslint rule for file naming convention 2023-05-09 12:34:34 -04:00
test
.eslintrc.js
index.js 🐛 Fixed subscriptions visible as "Active" within Ghost Admin (#16255) 2023-02-13 13:07:53 +01:00
package.json Added consistent linting pattern to all packages 2023-06-13 10:43:29 +01:00
README.md

Member Events

Usage

const {MemberEntryViewEvent} = require('@tryghost/member-events');

const event = MemberEntryViewEvent.create({
    memberId: member.id,
    memberStatus: member.status,
    entryId: post.id,
    entryUrl: post.url
});

const DomainEvents = require('@tryghost/domain-events');

DomainEvents.dispatch(event);