MCPcopy Create free account
hub / github.com/aliasvault/aliasvault / watch

Function watch

apps/server/AliasVault.Client/scripts/bundle-js.mjs:65–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65async function watch() {
66 console.log('Watching for changes...');
67
68 // Initial build
69 await build();
70
71 // Watch input files
72 for (const file of inputFiles) {
73 const filePath = path.join(rootDir, file);
74 fs.watch(filePath, async (eventType) => {
75 if (eventType === 'change') {
76 console.log(`\nFile changed: ${file}`);
77 await build();
78 }
79 });
80 }
81}
82
83if (isWatch) {
84 watch().catch(console.error);

Callers 1

bundle-js.mjsFile · 0.85

Calls 1

buildFunction · 0.85

Tested by

no test coverage detected