Metadata-Version: 2.4
Name: min-js
Version: 3.1.1
Summary: JavaScript minifier.
Home-page: https://github.com/QQSHI13/js-min/
Author: Dave St.Germain
Author-email: dave@st.germa.in
Maintainer: Tikitu de Jager
Maintainer-email: tikitu+jsmin@logophile.org
License: MIT License
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Pre-processors
Classifier: Topic :: Text Processing :: Filters
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: summary

# js-min

[![PyPI version](https://img.shields.io/pypi/v/min-js.svg)](https://pypi.org/project/min-js/)
[![Publish](https://github.com/QQSHI13/js-min/actions/workflows/publish.yml/badge.svg)](https://github.com/QQSHI13/js-min/actions/workflows/publish.yml)
[![CodeQL](https://github.com/QQSHI13/js-min/actions/workflows/codeql.yml/badge.svg)](https://github.com/QQSHI13/js-min/actions/workflows/codeql.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/QQSHI13/js-min/blob/main/LICENSE.txt)

A community fork of the [`jsmin`](https://github.com/tikitu/jsmin) JavaScript minifier.

- **GitHub:** https://github.com/QQSHI13/js-min
- **PyPI package:** `min-js`
- **Python module:** `js_min`

## Install

```bash
pip install min-js
```

## Usage

```python
from js_min import jsmin

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

Command line:

```bash
python -m js_min myfile.js
```

> **Note:** `js-min` makes no attempt to be compatible with
> [ECMAScript 6 / ES.next / Harmony](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts).

If you are minifying ES6 code, you can use the `quote_chars` parameter:

```python
from js_min import jsmin

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

## Where to get it

- Install from PyPI: https://pypi.org/project/min-js/
- Latest release branch on GitHub: https://github.com/QQSHI13/js-min/tree/latest-release/js_min
- Development version on GitHub: https://github.com/QQSHI13/js-min/

## Python 2 support removed

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

## Contributing

[Issues](https://github.com/QQSHI13/js-min/issues) and
[Pull requests](https://github.com/QQSHI13/js-min/pulls) are welcome.

The upstream 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 `main`.

Unless you request otherwise, your GitHub identity will be added to the
contributor list below.

## Contributors

Historical 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) — upstream 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)

## Users

If your project uses `js-min`, feel free to open a PR adding it to this list.

- *Your project here*

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.

