db696a9272
refs https://github.com/TryGhost/Toolbox/issues/203 - without `--all`, c8 ignores files that should be included in the coverage score but aren't used in tests - this means we have artificially high scores in places where this isn't used - this commit adds `--all` where previously missing - where this fails `--check-coverage`, that has been removed for now |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
LICENSE | ||
package.json | ||
README.md |
Member Events
Install
npm install @tryghost/member-events --save
or
yarn add @tryghost/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);
Develop
This is a mono repository, managed with lerna.
Follow the instructions for the top-level repo.
git clone
this repo &cd
into it as usual- Run
yarn
to install top-level dependencies.
Run
yarn dev
Test
yarn lint
run just eslintyarn test
run lint and tests