assemble / assemble-core

The core assemble application with no presets or defaults. All configuration is left to the implementor.
MIT License
17 stars 2 forks source link

Not all files are processed #7

Closed rparree closed 8 years ago

rparree commented 8 years ago

I have a problem that not all files get processed.

The same in the jekyll example

To test, add more posts:

for i in {1..100} ; do cp 2012-08-20-first-post.md test-$i.md; done

Then run the assemblefile.js. The output shows an incomplete rendering > ... log list, and even less make it into the _sites directory.

I have tried creating a collection and using toStream, which does result in complete list of rendering > ... logs, but still does not produce all files in _site

I have also tried making the node process wait before terminating , but that also did not work

rparree commented 8 years ago

Even when removing the rendering from the pipleline, it only copies part of the set

return app.src('_posts/*.md')
    .pipe(app.dest('_site'));
jonschlinkert commented 8 years ago

They are all process as it is currently, can you post your entire assemblefile to a gist?

rparree commented 8 years ago

This is the Jekyll example. So what i do is just add some posts to it:

for i in {1..100} ; do cp 2012-08-20-first-post.md test-$i.md; done
jonschlinkert commented 8 years ago

Hmm, let me take a look. It will have to be later today though, I still owe someone else some examples. Then I'll help you get this figured out if you're able to wait until then

jonschlinkert commented 8 years ago

nvm, I figured it out (two things technically). it's using an old assemble-core (0.1.1 I think, latest is 0.7.0), but I also introduced a regression last night. This helped me catch it, so thank you. I'll put up the fix in a moment

rparree commented 8 years ago

Doesn't the jekyll example use 0.7.0, it is referencing the moduled like var assemble = require('../..');?

BTW i have the same result with 0.6.0

jonschlinkert commented 8 years ago

ha, yes that's true. I guess I was distracted by the bug I found.

BTW i have the same result with 0.6.0

Good to know. I just pushed up a fix. Let me know if that works for you

rparree commented 8 years ago

The Jekyll example now works!, but my project still only does a partial process. The 'preRender' log does show all 84 pages, but only 15 are processed (meaning written to the destination).

I've placed the files in a gist: https://gist.github.com/rparree/aae0e4551a1259579e7a

doowb commented 8 years ago

@rparree make sure you have a return on this line

You're hitting the "high watermark" for streams because nothing is pulling the files through after the app.dest() plugin. By returning the stream, the files will be "pulled" through until none remain.

rparree commented 8 years ago

gotcha! tx

two more obstacles to go on my migration

jonschlinkert commented 8 years ago

two more obstacles to go on my migration

related to assemble, or just in general?

rparree commented 8 years ago

One is related to assemble, the other to handlebars (i think). The assemble problem is this one #8