Skip to main content

A simple tool for javascript packging using config files

Project description


jspack is a simple and small tool to aggegate javascript files with optional miminization.

The tool allows also:

  • Create initial configuration files from html files

  • Reemplace in html script tags by minimized ones.

The code is open source. Similar tool (more powerfull) is jstools


Python 2.6

For javascript minimization you can use jsmin or slimit


You can install jspack like a simple python egg:

  • Using easy_install: easy_install jstools

  • Using pip: pip install jstools

  • If you use buildout, add it to the eggs list in your buildout.cfg, or as a dependency of one of your own packages in


If you have a config file (test.cfg) like:

compress = true

root = /one/path
compress = true
files = file/relative/to/root.js

root = /another/path
compress = false
files = file/relative/to/root.js

It generates /one/path/concatenated.js and /another/path/compressed.js

If root option is not specified, the relative files are considered relative to the config parent directory (test.cfg).

You can use the help:

$ bin/jspack  --help
Usage: jspack [options] file_or_directory

  -h, --help            show this help message and exit
  -w, --write-config    For each FILE.html file write a FILE-jspack.cfg file
                        which later can be used to produce FILE-minimized.js
  -o, --ovewrite-config
                        Overwrite a .cfg file if exists
  -i INCLUDE, --include-only=INCLUDE
                        When parsing html, Include only javascript files which
                        match an expresion. Default (?!http), Use  for no
  -r, --replace-script-tags
                        Replace the script tags in html files
  -q, --quiet           Supress non error output


  • More documentation

  • Support of yahoo miminizer



0.2 (2011-06-02)

  • Nothing changed yet.

0.1 (2011-06-02)

  • Initial release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jspack-0.2.tar.gz (5.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page