This repository was archived by the owner on Mar 18, 2022. It is now read-only.

Description
In function renderTag() the cache timestamp is determined, but only set if the file exists. As you can see, this will never work.
fs.exists(path.join(options.publicDir, assets), function(exists) {
if (exists) {
timestamp = fs.statSync(path.join(options.publicDir, assets)).mtime.getTime();
}
});
position = assets.lastIndexOf('.');
var name = assets + '?cache=' + timestamp;
return createTag(src, name, attributes);
The situation is that you start the server and an asset you have specified in the html/css does not exist on the filesystem. What should happen in this case? Should the html tag still be rendered and in that case what should the ?cache parameter be set to?
If you get rid of the fs.exists check it will throw an exception at server start which might be a better way of handling the error?