Created
August 17, 2022 15:00
-
-
Save tatimblin/707eac146181feb4012ccaf95b4f8bf9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export { urlWritebackPlugin } from "src/urlWritebackPlugin"; | |
export { jiraNotification } from "src/jiraNotification"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const urlWritebackPlugin = ({field = 'c_pagesUrl', payload}) => { | |
fetch(`yext.com/${payload.id}`); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"artifactStructure": { | |
"assets": [ | |
{ | |
"root": "dist", | |
"pattern": "assets/**/*" | |
} | |
], | |
"features": "sites-config/features.json", | |
"plugins": [ | |
{ | |
"pluginName": "Generator", | |
"sourceFiles": [ | |
{ | |
"root": "dist/plugin", | |
"pattern": "*{.ts,.json}" | |
}, | |
{ | |
"root": "dist", | |
"pattern": "assets/{server,static,renderer}/**/*{.js,.css}" | |
} | |
], | |
"event": "ON_PAGE_GENERATE", | |
"functionName": "Generate" | |
}, | |
{ | |
"pluginName": "URL Writeback", | |
"sourceFiles": [ | |
{ | |
"root": "src/functions", | |
"pattern": "*{.ts,.json}" | |
} | |
], | |
"event": "ON_URL_CHANGE", | |
"functionName": "myUrlWritebackPlugin" | |
}, | |
{ | |
"pluginName": "Jira Notification", | |
"sourceFiles": [ | |
{ | |
"root": "src/functions", | |
"pattern": "*{.ts,.json}" | |
} | |
], | |
"event": "ON_SOME_HOOK", | |
"functionName": "jiraNotification" | |
} | |
] | |
}, | |
"dependencies": { | |
"installDepsCmd": "npm install", | |
"requiredFiles": ["package.json", "package-lock.json", ".npmrc"] | |
}, | |
"buildArtifacts": { | |
"buildCmd": "npm run build" | |
}, | |
"livePreview": { | |
"serveSetupCmd": ":" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { urlWritebackPlugin } from "deno.land/yext/functions"; | |
export { jiraNotification } from "deno.land/yext/functions"; | |
export const myUrlWritebackPlugin = urlWritebackPlugin({ | |
field: 'c_pagesUrl2' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment