After finally getting LESS-compiling into a Node.js app with express running on coffee, I ran into a problem where I seem to be running out of ideas:
Changes to the LESS-files will not invoke re-rendering from the LESS-compiler called by express.
In my main app.coffee file, this can be found (in that order)
app.use exp.compiler { src: __dirname + '/public', dest: __dirname + '/public', enable: ['less'] }
app.use exp.methodOverride()
app.use exp.bodyParser()
app.use exp.cookieParser()
app.use exp.static __dirname + '/public'
After that, session and middleware is added.
The problem with not recompiling .less files into .css when requested persists through app restarts.
I have tried swapping the exp.compiler and exp.static lines, but that changed nothing apart from what happens to the first client request (in short, css file is rendered but not delivered).
Deleting the .css file will obviously get the code to recompile the .less into .css, but that is not how I imagined a compiler like that. Is there anything else I can do?
1 Answer