Closed stramel closed 2 years ago
Thanks for finding this, will try to take a look today.
Ah, @FredKSchott It seems that this error is based on the placement of it.
This fails:
// Okay, time to pipe to the build directory
buildStream = buildStream.pipe(gulp.dest(buildDirectory));
// Now let's generate the HTTP/2 Push Manifest
buildStream = buildStream.pipe(polymerProject.addPushManifest());
This succeeds:
// Now let's generate the HTTP/2 Push Manifest
buildStream = buildStream.pipe(polymerProject.addPushManifest());
// Okay, time to pipe to the build directory
buildStream = buildStream.pipe(gulp.dest(buildDirectory));
Besides the obvious derp moment, I would still expect this to still not error out.
Haha nice!
gulp.dest
probably doesn't return files (unless you provide a passthrough
option) so there's not much we can do here.
@FredKSchott Typically, you can do something like this:
gulp.src('src/**/*.js')
// This will output the non-minified version
.pipe(gulp.dest(DEST))
// This will minify and rename to *.min.js
.pipe(uglify())
.pipe(rename({ extname: '.min.js' }))
.pipe(gulp.dest(DEST));
Here is the "recipe" from gulp https://github.com/gulpjs/gulp/blob/4.0/docs/recipes/minified-and-non-minified.md
huh interesting, I must have had that backwards.
No idea why it wouldn't be working then.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!
Description
When using
polymer-build#^1.0.0
with gulp in the app fromgenerator-polymer-init-custom-build
the gulp process dies on thepolymerProject.addPushManifest()
line. commenting this line out causes the build to work.Versions & Environment
Steps to Reproduce
git clone https://github.com/stramel/demo-polymer-build-repro.git
npm i;bower i
npm run build
gulpfile.js
(buildStream = buildStream.pipe(polymerProject.addPushManifest());
)npm run build
Expected Results
Successful build process with push manifest
Actual Results
Unsuccessful build process with push manifest