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

`assemble` task hanging before rendering #12

Closed stephenkao closed 8 years ago

stephenkao commented 8 years ago

When I try to run watch (from base-watch), the task hangs indefinitely after a certain number of files are piped. When I try to run build, it terminates silently after the same number of files are piped. I'm using assemble-core v0.11.2 and assemble-render-file v0.3.4. NOTE: This works with assemble-render-file v0.3.3.

screen shot 2016-02-26 at 1 36 27 pm
    app.task('build', isDev ? [] : ['template'], () => {
      app.pages(src);

      let stream = app.toStream('pages', (key, file) => {
        if (isMaster) {
          const {devOnly} = file.data;
          return _.isUndefined(devOnly);
        }
        return true;
      })
      .pipe(isoMerge(app, !isDev))
      .on('data', (file) => {
        log(`Piped ${blue(renameKey(file.path))}`);
      })
      .pipe(app.renderFile())
      .pipe(app.dest(buildDir))
      .on('data', (file) => {
        log(`Rendered ${blue(renameKey(file.path))}`);
      })
      .on('error', (err) => {
        logError({err, plugin: '[assemble]: build'});
      });

      if (isDev) {
        stream = stream.pipe(browserSync.stream());
      }

      return stream;
    });

When this is built properly, the following files are built and rendered:

screen shot 2016-02-26 at 1 39 36 pm
assemblebot commented 8 years ago

@stephenkao Thanks for the issue! If you're reporting a bug, please be sure to include:

doowb commented 8 years ago

@stephenkao thanks for the details. There was a version mismatch. assemble-render-file depends on templates >= 0.14.4 (but it's not a true dependency).

I un-published assemble-render-file@0.3.4 and bumped the minor so older versions of assemble-core won't pick it up. Everything should be good now if you upgrade to the latest version of assemble-core.

jonschlinkert commented 8 years ago

There was a version mismatch. assemble-render-file depends on templates >= 0.14.4 (but it's not a true dependency).

so it was human error @doowb?

doowb commented 8 years ago

Yeah... a @doowb error :smile:

stephenkao commented 8 years ago

Thanks for the quick turnaround!