Skip to main content

jspack

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

Requirements

Python 2.6

For javascript minimization you can use jsmin or slimit

Install

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 setup.py.

Usage

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

[DEFAULT]
compress = true

[concatenated.js]
root = /one/path
compress = true
files = file/relative/to/root.js
        /absolute/file.js

[compressed.js]
root = /another/path
compress = false
files = file/relative/to/root.js
        js/two.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

Options:
  -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
                        restriction
  -r, --replace-script-tags
                        Replace the script tags in html files
  -q, --quiet           Supress non error output

Roadmap

  • More documentation

  • Support of yahoo miminizer

Credits

Changelog

0.2 (2011-06-02)

  • Nothing changed yet.

0.1 (2011-06-02)

  • Initial release

Metadata

Release files for jspack 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jspack 0.2
File Size Uploaded Provenance Actions
jspack-0.2.tar.gz 5.4 kB Without provenance Details for jspack-0.2.tar.gz

Release files / jspack-0.2.tar.gz

Download URL jspack-0.2.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a26c7d458f28ac72f51aeae8d7ab9e2b5f970baa67515ca46e434f8ad5f244d7
BLAKE2b-256 checksum
How to use checksums
273031b25502b5ac369062545f9ff5f3ceb82477bfbf2ac29f629c1e41c7aad1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for jspack 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page