Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    grunt-zipstreampublic

    grunt-zipstream

    Create ZIP files with zipstream.

    Getting Started

    Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-zipstream

    Then add this line to your project's grunt.js gruntfile:

    grunt.loadNpmTasks('grunt-zipstream');
    

    Documentation

    A simple multitask called zip is defined. Configure it like so:

    grunt.initConfig({
        zip: {
            foobar: {
                src: [
                    'static/images/**/*''
                    'static/index.html',
                    'README.md'
                ],
                dest: 'package.zip',
    
                /* optional */
                base: 'some/path',
                subdir: 'some/path',
                zlib: {
                    level: 1
                }
            }
        },
        /* optional */
        zlib: { /* ... */ }
    });
    

    The base option can be set to a base path that will be stripped off the filenames in the zip file. The subdir option allows you to add a custom prefix to filenames in the zip file, (usually a single directory name.)

    Per task, or globally, you can set zlib to options for the Node.js zlib module. See the zlib documentation for specifics, but the most useful will be the level option controlling compression level.

    License

    Copyright (c) 2013 Stéphan Kochen
    Licensed under the MIT license.
    

    Keywords

    none

    install

    npm i grunt-zipstream

    Downloadsweekly downloads

    76

    version

    0.2.2

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar