jsmin


Namejsmin JSON
Version 3.0.1 PyPI version JSON
download
home_pagehttps://github.com/tikitu/jsmin/
SummaryJavaScript minifier.
upload_time2022-01-16 20:35:59
maintainerTikitu de Jager
docs_urlNone
authorDave St.Germain
requires_python
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            =====
jsmin
=====

JavaScript minifier.

Usage
=====

.. code:: python

 from jsmin import jsmin
 with open('myfile.js') as js_file:
     minified = jsmin(js_file.read())

You can run it as a commandline tool also::

  python -m jsmin myfile.js

NB: ``jsmin`` makes no attempt to be compatible with
`ECMAScript 6 / ES.next / Harmony <http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts>`_.
The current maintainer does not intend to add ES6-compatibility. If you would
like to take over maintenance and update ``jsmin`` for ES6, please contact
`Tikitu de Jager <mailto:tikitu+jsmin@logophile.org>`_. Pull requests are also
welcome, of course, but my time to review them is somewhat limited these days.

If you're using ``jsmin`` on ES6 code, though, you might find the ``quote_chars``
parameter useful:

.. code:: python

 from jsmin import jsmin
 with open('myfile.js') as js_file:
     minified = jsmin(js_file.read(), quote_chars="'\"`")


Where to get it
===============

* install the package `from pypi <https://pypi.python.org/pypi/jsmin/>`_
* get the latest release `from latest-release on github <https://github.com/tikitu/jsmin/tree/latest-release/jsmin>`_
* get the development version `from master on github <https://github.com/tikitu/jsmin/>`_


Python 2 support removed
========================

Python 2 support was removed in version 3.0.0. If you need to support Python 2, please use version 2.2.2 with setuptools<58.

Contributing
============

`Issues <https://github.com/tikitu/jsmin/issues>`_ and `Pull requests <https://github.com/tikitu/jsmin/pulls>`_
will be gratefully received on Github. The project used to be hosted
`on bitbucket <https://bitbucket.org/dcs/jsmin/>`_ and old issues can still be
found there.

If possible, please make separate pull requests for tests and for code: tests will be added to the `latest-release` branch while code will go to `master`.

Unless you request otherwise, your Github identity will be added to the contributor's list below; if you prefer a
different name feel free to add it in your pull request instead. (If you prefer not to be mentioned you'll have to let
the maintainer know somehow.)

Build/test status
=================

Both branches are tested with Travis: https://travis-ci.org/tikitu/jsmin

The `latest-release` branch (the version on PyPI plus any new tests) is tested against CPython 3.
Currently:

.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=latest-release

If that branch is failing that means there's a new test that fails on *the latest released version on pypi*, with no fix yet
released.

The `master` branch (development version, might be ahead of latest released version) is tested against CPython 3.
Currently:

.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=master

If `master` is failing don't use it, but as long as `latest-release` is passing the pypi release should be ok.

Contributors (chronological commit order)
=========================================

* `Dave St.Germain <https://bitbucket.org/dcs>`_ (original author)
* `Hans weltar <https://bitbucket.org/hansweltar>`_
* `Tikitu de Jager <mailto:tikitu+jsmin@logophile.org>`_ (current maintainer)
* https://bitbucket.org/rennat
* `Nick Alexander <https://bitbucket.org/ncalexan>`_
* `Gennady Kovshenin <https://github.com/soulseekah>`_
* `Matt Molyneaux <https://github.com/moggers87>`_
* `Albert Wang <https://github.com/albertyw>`_
* `Ben Bradshaw <https://github.com/serenecloud>`_

Changelog
=========

v3.0.0 (2021-09-08) Ben Bradshaw
--------------------------------

- Breaking Change: Removed support for Python 2

- Removed usage of use_2to3 in setup.py

v2.2.2 (2017-05-01) Tikitu de Jager
-----------------------------------

- Add license headers to code files (fixes i#17)

- Remove mercurial files (fixes #20)

v2.2.1 (2016-03-06) Tikitu de Jager
-----------------------------------

- Fix #14: Infinite loop on `return x / 1;`

v2.2.0 (2015-12-19) Tikitu de Jager
-----------------------------------

- Merge #13: Preserve "loud comments" starting with `/*!`

  These are commonly used for copyright notices, and are preserved by various
  other minifiers (e.g. YUI Compressor).

v2.1.6 (2015-10-14) Tikitu de Jager
-----------------------------------

- Fix #12: Newline following a regex literal should not be elided.

v2.1.5 (2015-10-11) Tikitu de Jager
-----------------------------------

- Fix #9: Premature end of statement caused by multi-line comment not
  adding newline.

- Fix #10: Removing multiline comment separating tokens must leave a space.

- Refactor comment handling for maintainability.

v2.1.4 (2015-08-23) Tikitu de Jager
-----------------------------------

- Fix #6: regex literal matching comment was not correctly matched.

- Refactor regex literal handling for robustness.

v2.1.3 (2015-08-09) Tikitu de Jager
-----------------------------------

- Reset issue numbering: issues live in github from now on.

- Fix #1: regex literal was not recognised when occurring directly after `{`.

v2.1.2 (2015-07-12) Tikitu de Jager
-----------------------------------

- Issue numbers here and below refer to the bitbucket repository.

- Fix #17: bug when JS starts with comment then literal regex.

v2.1.1 (2015-02-14) Tikitu de Jager
-----------------------------------

- Fix #16: bug returning a literal regex containing escaped forward-slashes.

v2.1.0 (2014-12-24) Tikitu de Jager
-----------------------------------

- First changelog entries; see README.rst for prior contributors.

- Expose quote_chars parameter to provide just enough unofficial Harmony
  support to be useful.




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tikitu/jsmin/",
    "name": "jsmin",
    "maintainer": "Tikitu de Jager",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "tikitu+jsmin@logophile.org",
    "keywords": "",
    "author": "Dave St.Germain",
    "author_email": "dave@st.germa.in",
    "download_url": "https://files.pythonhosted.org/packages/5e/73/e01e4c5e11ad0494f4407a3f623ad4d87714909f50b17a06ed121034ff6e/jsmin-3.0.1.tar.gz",
    "platform": "",
    "description": "=====\njsmin\n=====\n\nJavaScript minifier.\n\nUsage\n=====\n\n.. code:: python\n\n from jsmin import jsmin\n with open('myfile.js') as js_file:\n     minified = jsmin(js_file.read())\n\nYou can run it as a commandline tool also::\n\n  python -m jsmin myfile.js\n\nNB: ``jsmin`` makes no attempt to be compatible with\n`ECMAScript 6 / ES.next / Harmony <http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts>`_.\nThe current maintainer does not intend to add ES6-compatibility. If you would\nlike to take over maintenance and update ``jsmin`` for ES6, please contact\n`Tikitu de Jager <mailto:tikitu+jsmin@logophile.org>`_. Pull requests are also\nwelcome, of course, but my time to review them is somewhat limited these days.\n\nIf you're using ``jsmin`` on ES6 code, though, you might find the ``quote_chars``\nparameter useful:\n\n.. code:: python\n\n from jsmin import jsmin\n with open('myfile.js') as js_file:\n     minified = jsmin(js_file.read(), quote_chars=\"'\\\"`\")\n\n\nWhere to get it\n===============\n\n* install the package `from pypi <https://pypi.python.org/pypi/jsmin/>`_\n* get the latest release `from latest-release on github <https://github.com/tikitu/jsmin/tree/latest-release/jsmin>`_\n* get the development version `from master on github <https://github.com/tikitu/jsmin/>`_\n\n\nPython 2 support removed\n========================\n\nPython 2 support was removed in version 3.0.0. If you need to support Python 2, please use version 2.2.2 with setuptools<58.\n\nContributing\n============\n\n`Issues <https://github.com/tikitu/jsmin/issues>`_ and `Pull requests <https://github.com/tikitu/jsmin/pulls>`_\nwill be gratefully received on Github. The project used to be hosted\n`on bitbucket <https://bitbucket.org/dcs/jsmin/>`_ and old issues can still be\nfound there.\n\nIf possible, please make separate pull requests for tests and for code: tests will be added to the `latest-release` branch while code will go to `master`.\n\nUnless you request otherwise, your Github identity will be added to the contributor's list below; if you prefer a\ndifferent name feel free to add it in your pull request instead. (If you prefer not to be mentioned you'll have to let\nthe maintainer know somehow.)\n\nBuild/test status\n=================\n\nBoth branches are tested with Travis: https://travis-ci.org/tikitu/jsmin\n\nThe `latest-release` branch (the version on PyPI plus any new tests) is tested against CPython 3.\nCurrently:\n\n.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=latest-release\n\nIf that branch is failing that means there's a new test that fails on *the latest released version on pypi*, with no fix yet\nreleased.\n\nThe `master` branch (development version, might be ahead of latest released version) is tested against CPython 3.\nCurrently:\n\n.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=master\n\nIf `master` is failing don't use it, but as long as `latest-release` is passing the pypi release should be ok.\n\nContributors (chronological commit order)\n=========================================\n\n* `Dave St.Germain <https://bitbucket.org/dcs>`_ (original author)\n* `Hans weltar <https://bitbucket.org/hansweltar>`_\n* `Tikitu de Jager <mailto:tikitu+jsmin@logophile.org>`_ (current maintainer)\n* https://bitbucket.org/rennat\n* `Nick Alexander <https://bitbucket.org/ncalexan>`_\n* `Gennady Kovshenin <https://github.com/soulseekah>`_\n* `Matt Molyneaux <https://github.com/moggers87>`_\n* `Albert Wang <https://github.com/albertyw>`_\n* `Ben Bradshaw <https://github.com/serenecloud>`_\n\nChangelog\n=========\n\nv3.0.0 (2021-09-08) Ben Bradshaw\n--------------------------------\n\n- Breaking Change: Removed support for Python 2\n\n- Removed usage of use_2to3 in setup.py\n\nv2.2.2 (2017-05-01) Tikitu de Jager\n-----------------------------------\n\n- Add license headers to code files (fixes i#17)\n\n- Remove mercurial files (fixes #20)\n\nv2.2.1 (2016-03-06) Tikitu de Jager\n-----------------------------------\n\n- Fix #14: Infinite loop on `return x / 1;`\n\nv2.2.0 (2015-12-19) Tikitu de Jager\n-----------------------------------\n\n- Merge #13: Preserve \"loud comments\" starting with `/*!`\n\n  These are commonly used for copyright notices, and are preserved by various\n  other minifiers (e.g. YUI Compressor).\n\nv2.1.6 (2015-10-14) Tikitu de Jager\n-----------------------------------\n\n- Fix #12: Newline following a regex literal should not be elided.\n\nv2.1.5 (2015-10-11) Tikitu de Jager\n-----------------------------------\n\n- Fix #9: Premature end of statement caused by multi-line comment not\n  adding newline.\n\n- Fix #10: Removing multiline comment separating tokens must leave a space.\n\n- Refactor comment handling for maintainability.\n\nv2.1.4 (2015-08-23) Tikitu de Jager\n-----------------------------------\n\n- Fix #6: regex literal matching comment was not correctly matched.\n\n- Refactor regex literal handling for robustness.\n\nv2.1.3 (2015-08-09) Tikitu de Jager\n-----------------------------------\n\n- Reset issue numbering: issues live in github from now on.\n\n- Fix #1: regex literal was not recognised when occurring directly after `{`.\n\nv2.1.2 (2015-07-12) Tikitu de Jager\n-----------------------------------\n\n- Issue numbers here and below refer to the bitbucket repository.\n\n- Fix #17: bug when JS starts with comment then literal regex.\n\nv2.1.1 (2015-02-14) Tikitu de Jager\n-----------------------------------\n\n- Fix #16: bug returning a literal regex containing escaped forward-slashes.\n\nv2.1.0 (2014-12-24) Tikitu de Jager\n-----------------------------------\n\n- First changelog entries; see README.rst for prior contributors.\n\n- Expose quote_chars parameter to provide just enough unofficial Harmony\n  support to be useful.\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "JavaScript minifier.",
    "version": "3.0.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "8b68605422eb47c8fcdb02a78efc068b",
                "sha256": "c0959a121ef94542e807a674142606f7e90214a2b3d1eb17300244bbb5cc2bfc"
            },
            "downloads": -1,
            "filename": "jsmin-3.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8b68605422eb47c8fcdb02a78efc068b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13925,
            "upload_time": "2022-01-16T20:35:59",
            "upload_time_iso_8601": "2022-01-16T20:35:59.130934Z",
            "url": "https://files.pythonhosted.org/packages/5e/73/e01e4c5e11ad0494f4407a3f623ad4d87714909f50b17a06ed121034ff6e/jsmin-3.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-01-16 20:35:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "tikitu",
    "github_project": "jsmin",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jsmin"
}
        
Elapsed time: 0.14889s