Update plugin shape
This commit is contained in:
parent
504c1e6f3c
commit
ae1b9e262e
12 changed files with 181 additions and 149 deletions
|
@ -1,14 +1,19 @@
|
|||
export const name = "Announce Slam Dunks";
|
||||
export const description = "Get hype when a file has slam dunks";
|
||||
|
||||
export const process = (binding, { dunks }) => {
|
||||
export const step = ({ entries, options, ...rest }) => {
|
||||
const { dunks } = options;
|
||||
const slamDunkKey = dunks?.key ?? "slamDunks";
|
||||
|
||||
for (const entry of binding.entries) {
|
||||
for (const entry of entries) {
|
||||
if (slamDunkKey in entry.data) {
|
||||
console.log(`Slam dunk!`);
|
||||
}
|
||||
}
|
||||
|
||||
return binding;
|
||||
return {
|
||||
entries,
|
||||
options,
|
||||
...rest,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue