MCPcopy
hub / github.com/SparkPost/heml / update

Function update

packages/heml/src/bin/commands/develop.js:93–101  ·  view source on GitHub ↗
({ html, errors, metadata })

Source from the content-addressed store, hash-verified

91 app.use(express.static(directory))
92
93 function update ({ html, errors, metadata }) {
94 let status = errors.length ? chalk.red('failed') : chalk.green('success')
95 preview = errors.length
96 ? buildErrorPage(errors)
97 : html.replace('</body>', '<script src="/reload/reload.js"></script></body>')
98
99 renderCLI({ url, status, time: metadata.time, size: metadata.size })
100 reload()
101 }
102
103 return new Promise((resolve, reject) => {
104 getPort({ port }).then((availablePort) => {

Callers 1

developFunction · 0.85

Calls 1

renderCLIFunction · 0.85

Tested by

no test coverage detected