Trying to use DocPad locally, "watch" don't works. #665

Closed
felquis opened this Issue Oct 2, 2013 · 5 comments

3 participants

@felquis

Hi, my source code, i'm using Windows 7, Node v0.10.17, DocPad 6.53.1

I read the Doc API, and i'm trying to use this:

var docpadInstanceConfiguration = require('./docpad.js'),
    open = require('open');

// http://docpad.org/docs/troubleshoot#watching-doesn-t-work-works-only-some-of-the-time-or-i-get-eisdir-errors
docpadInstanceConfiguration.watchOptions = {
    preferredMethods: ['watchFile','watch']
}

require('docpad').createInstance(docpadInstanceConfiguration, function(err, docpadInstance) {
    if (err)  return console.log(err.stack);

    docpadInstance.action('generate watch server', function(err, result) {
        if (err)  return console.log(err.stack);

        open('http://localhost:' + docpadInstance.getPort());
    });
});

When I edit a file, is shown in the terminal

info: Reload change detected at 15:24:52
info: Regenerating at 15:24:52
info: Generating...
warning:
  Rendering the extension "js" to "min" on "themes\yellow-swan\js\jquery-1.8.3.min.js" didn't do anything.
  Explanation here: http://docpad.org/extension-not-rendering
warning:
  Rendering the extension "min" to "3" on "themes\yellow-swan\js\jquery-1.8.3.min.js" didn't do anything.
  Explanation here: http://docpad.org/extension-not-rendering
warning:
  Rendering the extension "3" to "8" on "themes\yellow-swan\js\jquery-1.8.3.min.js" didn't do anything.
  Explanation here: http://docpad.org/extension-not-rendering
info: Generated 28/28 files in 1.577 seconds
info: Regenerated at 15:24:54

reload in http://localhost:9778/ but nothing change :/

@greduan

This is a simple problem. As you might know, DocPad sees .html.md as "render Markdown to HTML". That's what's going on there. It's trying to render JS to min (which doesn't exist), then min to 3 (again, not a real file type), and then 3 to 8.

So all you gotta do is move that jQuery file to the same folder, but inside the files folder and not the documents folder.

The documents folder has all the files that are to be rendered, the files folder contains the files that are to be served as is without rendering from one filetype to another.

Hope that helps. :)

@felquis

@Greduan The problem isn't the warnings, the problem is that the watch isn't regenerating the changed files.

@greduan

Ah OK. What file did you change that wasn't recognized?

@balupton
DocPad member

Seems like a bug in bevry/watchr rather than DocPad. Can you follow it up there?

@balupton balupton closed this Nov 28, 2013
@felquis

@balupton Done ⬆️

But, it seems like a bug in regenerating the source... It is firing the Watch event, but it is not regenerating the source...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment