Jade compiler doesn't implement determineDependentFiles() #80
Description
I am currently experiencing an issue that I think I have been able to track back to electron-compilers. I think the issue is that the electron-compilers/src/html/jade.js
compiler doesn't implement the determineDependentFiles()
function. It is also possible that I'm mistaken. If that's the case, then I apologize.
I found this by trying to use electron-forge which uses electron-compile for compiling jade. I created a jade template that called out to a partial. Updating the partial would not cause the parent file to be recompiled as I expected. However, updating the parent file would cause the partial to be recompiled.
I am pretty new to node.js and electron. I have more experience with Ruby. But I'm willing to take a stab at implementing this, with a little guidance.
For reference, I have created a repo to showcase the problem here: https://github.com/alexshenoy/jade-compiler-troubleshooting
Steps To Reproduce:
- Run
npm start
- Modify
partial.jade
- Run
npm start
again - See cached index.html instead of new version.
Relevant code from the repo:
createWindow() from index.js:
const createWindow = () => {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
});
mainWindow.loadURL(`file://${__dirname}/index.jade`);
mainWindow.on('closed', () => {
mainWindow = null;
});
};
index.jade:
doctype html
html
head
title Electron Playground
body
include ./partial
Hi Mom!! Test of some kind
partial.jade
h4 This is a title
p.
Changes in this file will not be reflected in the above partial.