Skip to content

ShivanKaul/pack.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

pack.sh

Easily pack Chrome Extensions into versioned zips for deploying on the Web Store. Optionally also bump up version number in manifest.json before packing:

$ ./pack [bump]

Install

Get the script and keep in top level of your Chrome Extension project: pack.sh

Usage

Create a directory named extension/ and put all the code you want packaged as your Chrome Extension inside it. The manifest.json should be immediately inside (one folder below) extension/. Keep this pack.sh script one directory above manifest.json (i.e. same directory level as extension/), along with dev stuff like .git, screen-shots, README.md, etc. For example, the PrettyPrintGmail Chrome Extension folder structure looks like this (every two dashed lines represents one tree level):

   |--CHANGELOG.md
   |--README.md
   |--pack.sh
   |--screenshots/
   |----screenshot1.png
   |----...
   |--extension/
   |----manifest.json
   |----assets/
   |------icon-128.png
   |------...
   |----lib/
   |------helper.js
   |----src/
   |------background.js
   |------print.js
   |------...

The script checks the current version from the manifest file, and repacks the source code into a new version-numbered zip, deleting the previous versioned zip if it exists.

Note: Removes .DS_Stores before packaging, if on Mac.

Bump

If you want to bump up the version number in the manifest.json before packing, pass in bump as an argument to the script. Note that it is assumed that you've versioned your extension in the {major}.{minor}.{patch} way.

$ ./pack bump

This will increment the version in the manifest and package the extension with the new version number.

About

Build script for Chrome Extensions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages