Skip to content

Node package to zip your build directory and name it according to your package.json name and version.

License

Notifications You must be signed in to change notification settings

tribal2/zip-build

Repository files navigation

Welcome to zip-build 👋

Version Downloads

Documentation Maintenance License: MIT

Node package to zip your build directory and name it according to your package.json name and version.

Install

$ npm install --save-dev zip-build

Usage

$ zip-build --help

# Usage: zip-build <build-dir> <zip-dir> [options]
#
# Positionals:
#   buildDir  Directory of your build output                    [default: "build"]
#   zipDir    Directory for your zipped backup                   [default: "dist"]
#
# Options:
#       --version      Show version number                               [boolean]
#   -h, --help         Show help                                         [boolean]
#   -i, --interactive  Enable interactive mode          [boolean] [default: false]
#   -f, --format       Format of output file
#                                [string] [choices: "zip", "tar"] [default: "zip"]
#   -n, --name         Ask for output archive filename (requires flag
#                      --interactive)                   [boolean] [default: false]
#   -t, --template     Template for output archive filename
#                         [string] [default: "%NAME%_%VERSION%_%TIMESTAMP%.%EXT%"]
#   -s, --subDir       Creates a sub directory to put all files
#                                                           [string] [default: ""]
#   -o, --override     Override the output file if it already exists
#                                                       [boolean] [default: false]
#
# Examples:
#   zip-build                    Zip <build> directory and put archive under
#                                <dist> directory.
#   zip-build out backup         Zip <out> directory and put archive under
#                                <backup> directory.
#   zip-build out backup -f tar  Archive <out> directory and put archive under
#                                <backup> directory compressed with Tar.

Include it as part of your npm build workflow:

//package.json
  {
    "name": "your-project",
    // ...
    "scripts": {
      // ...
      "build": "build && zip-build",
      // ...
    },
    // ...
  }

CONTRIBUTING

  • Use Conventional commits specification for your commit messages.
  • Write test for your changes and make sure they pass before opening a PR.
  • Open your PR against the base:develop branch.

Author

👤 Ricardo Tribaldos (https://barustudio.com)

Github: tribal2 Twitter: r\_tribaldos Linkedin: rtribaldos

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 Ricardo Tribaldos (https://barustudio.com).
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

About

Node package to zip your build directory and name it according to your package.json name and version.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published