npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bung87/gitzip

v1.0.2

Published

Archives ignoring files from gitignore

Downloads

3

Readme

:zipper_mouth_face: gitzip

This module provides a gitzip command that creates zip file ignoring files from .gitignore file.

If the source folder doesn't contain .gitignore then all files will be zipped.

:bulb: Useful to share the current changes while working on git repository. It complements the git archive where you don't need to commit or stash the changes to create untracked changed file.

Global command line usage

npm install -g gitzip

go to the folder you want to zip and run

gitzip

This will generate submission.zip

Command line usage within package.json scripts

npm install --save-dev gitzip

package.json:

{
    //...
    "scripts": {
        "build" "...",
        "zip": "gitzip -d bundle.zip -s build/*",
        "upload": "....",
        "deploy": "npm run build && npm run zip && npm run upload"
    }
}

Programmatic usage from within Node.js

var zip = require('gitzip');

zip({
  source: 'build/*',
  destination: './destination.zip',
  exclude: ['destination.zip'],
  include: ['.git']
}).then(function() {
  console.log('all done!');
}).catch(function(err) {
  console.error(err.stack);
  process.exit(1);
});

Options

source[-s]

* Type: `string`
* Default: `.` current directory

Path to files and folders to include in the zip file. String or Array of Strings. Defaults to current path.

destination

* Type: `string`
* Default: `submission.zip` at current directory

Path to generated .zip file. Defaults to submission.zip in current path.

exclude

* Type: `string[]`

Array of strings of file pattern to exclude from zip

include

* Type: `string[]`

Array of strings of file pattern to include in zip.

Note, include has more precedence than exclude

Node Version

Node 8 or greater

License

This software is released under the terms of the MIT license.