(filePath, watchEvent)
| 28 | _handleSCSS(); |
| 29 | |
| 30 | function _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 | |
| 65 | function _handlePug(filePath, watchEvent) { |
| 66 | if (watchEvent === 'change') { |
no test coverage detected