MCPcopy Create free account
hub / github.com/11ty/dev-server / reload

Method reload

server.js:1000–1021  ·  view source on GitHub ↗
(event = {})

Source from the content-addressed store, hash-verified

998 }
999
1000 reload(event = {}) {
1001 let { subtype, files, build } = event;
1002 if (build?.templates) {
1003 build.templates = build.templates
1004 .filter(entry => {
1005 if(!this.options.domDiff) {
1006 // Don’t include any files if the dom diffing option is disabled
1007 return false;
1008 }
1009
1010 // Filter to only include watched templates that were updated
1011 return (files || []).includes(entry.inputPath);
1012 });
1013 }
1014
1015 this.sendUpdateNotification({
1016 type: "eleventy.reload",
1017 subtype,
1018 files,
1019 build,
1020 });
1021 }
1022}
1023
1024module.exports = EleventyDevServer;

Callers 4

reloadFilesMethod · 0.95
fullPageReloadMethod · 0.80
EleventyReloadClass · 0.80
initMethod · 0.80

Calls 1

Tested by

no test coverage detected