• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

jsmin/H30-Mar-2022-645513

jsmin.egg-info/H03-May-2022-11885

MANIFEST.inH A D30-Mar-202214 21

PKG-INFOH A D30-Mar-20224.8 KiB11885

README.rstH A D30-Mar-20222.8 KiB8154

setup.cfgH A D30-Mar-202259 64

setup.pyH A D30-Mar-20221.6 KiB4839

README.rst

1=====
2jsmin
3=====
4
5JavaScript minifier.
6
7Usage
8=====
9
10.. code:: python
11
12 from jsmin import jsmin
13 with open('myfile.js') as js_file:
14     minified = jsmin(js_file.read())
15
16You can run it as a commandline tool also::
17
18  python -m jsmin myfile.js
19
20As yet, ``jsmin`` makes no attempt to be compatible with
21`ECMAScript 6 / ES.next / Harmony <http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts>`_.
22If you're using it on Harmony code, though, you might find the ``quote_chars``
23parameter useful:
24
25.. code:: python
26
27 from jsmin import jsmin
28 with open('myfile.js') as js_file:
29     minified = jsmin(js_file.read(), quote_chars="'\"`")
30
31
32Where to get it
33===============
34
35* install the package `from pypi <https://pypi.python.org/pypi/jsmin/>`_
36* get the latest release `from the stable branch on bitbucket <https://bitbucket.org/dcs/jsmin/branch/stable>`_
37* get the development version `from the default branch on bitbucket <https://bitbucket.org/dcs/jsmin/branch/default>`_
38
39Contributing
40============
41
42`Issues <https://bitbucket.org/dcs/jsmin/issues>`_ and `Pull requests <https://bitbucket.org/dcs/jsmin/pull-requests>`_
43will be gratefully received on Bitbucket. Pull requests on github are great too, but the issue tracker lives on
44bitbucket.
45
46If possible, please make separate pull requests for tests and for code: tests will be committed on the stable branch
47(which tracks the latest released version) while code will go to default by, erm, default.
48
49Unless you request otherwise, your Bitbucket identity will be added to the contributor's list below; if you prefer a
50different name feel free to add it in your pull request instead. (If you prefer not to be mentioned you'll have to let
51the maintainer know somehow.)
52
53Build/test status
54=================
55
56Both default and stable branches are tested with Travis: https://travis-ci.org/tikitu/jsmin
57
58Stable (latest released version plus any new tests) is tested against CPython 2.6, 2.7, 3.2, and 3.3.
59Currently:
60
61.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=ghstable
62
63If stable is failing that means there's a new test that fails on *the latest released version on pypi*, with no fix yet
64released.
65
66Default (development version, might be ahead of latest released version) is tested against CPython 2.6, 2.7, 3.2, and
673.3. Currently:
68
69.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=master
70
71If default is failing don't use it, but as long as stable is passing the pypi release should be ok.
72
73Contributors (chronological commit order)
74=========================================
75
76* `Dave St.Germain <https://bitbucket.org/dcs>`_ (original author)
77* `Hans weltar <https://bitbucket.org/hansweltar>`_
78* `Tikitu de Jager <mailto:tikitu+jsmin@logophile.org>`_ (current maintainer)
79* https://bitbucket.org/rennat
80* `Nick Alexander <https://bitbucket.org/ncalexan>`_
81