New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change root within zip? #3
Comments
I tried the following, but this resulted in an empty zip, like #1.
|
Answer:
|
Ya, cwd probably expects an absolute path. I would tweak it slightly though: var path = require('path');
gulp.task('default', function () {
gulp.src('*', {cwd: path.join(process.cwd(), 'build')})
.pipe(zip('archive.zip'))
.pipe(gulp.dest('dist'));
}); |
@bartlewis In 3.4 I'll make sure cwd accepts relative paths. Should be out soon |
Thanks guys. |
This was referenced May 14, 2014
Closed
Closed
For me on OSX it is impossible to create an archive without the parent folder in it:
|
Anything doesnt work! I've tried the code but unlucky to achieve. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above results in the "src" folder being the top level within the zip file. How do I make the contents of "src" the top level of the zip instead?
The text was updated successfully, but these errors were encountered: