MCPcopy
hub / github.com/StartBootstrap/startbootstrap-simple-sidebar / _processFile

Function _processFile

scripts/sb-watch.js:30–63  ·  view source on GitHub ↗
(filePath, watchEvent)

Source from the content-addressed store, hash-verified

28_handleSCSS();
29
30function _processFile(filePath, watchEvent) {
31
32 if (!READY) {
33 if (filePath.match(/\.pug$/)) {
34 if (!filePath.match(/includes/) && !filePath.match(/mixins/) && !filePath.match(/\/pug\/layouts\//)) {
35 allPugFiles[filePath] = true;
36 }
37 }
38 process.stdout.write('.');
39 return;
40 }
41
42 console.log(`### INFO: File event: ${watchEvent}: ${filePath}`);
43
44 if (filePath.match(/\.pug$/)) {
45 return _handlePug(filePath, watchEvent);
46 }
47
48 if (filePath.match(/\.scss$/)) {
49 if (watchEvent === 'change') {
50 return _handleSCSS(filePath, watchEvent);
51 }
52 return;
53 }
54
55 if (filePath.match(/src\/js\//)) {
56 return renderScripts();
57 }
58
59 if (filePath.match(/src\/assets\//)) {
60 return renderAssets();
61 }
62
63}
64
65function _handlePug(filePath, watchEvent) {
66 if (watchEvent === 'change') {

Callers 1

sb-watch.jsFile · 0.70

Calls 2

_handlePugFunction · 0.85
_handleSCSSFunction · 0.85

Tested by

no test coverage detected