# uglifyjs-folder

> Run terser on a folder and minify the result in a single file

Latest version **3.3.0** (published 2023-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install uglifyjs-folder
pnpm add uglifyjs-folder
yarn add uglifyjs-folder
bun add uglifyjs-folder
```

Provides the command `uglifyjs-folder`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.3.0 |
| Published | 2023-06-25 |
| First published | 2014-01-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14 |
| Dependencies | 6 |
| Unpacked size | 11.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 57 |
| Author | Mihai Ionut Vilcu |
| Maintainers | ionutvmi |
| Keywords | uglify, folder, directory, cli |

## Links

- npm: https://www.npmjs.com/package/uglifyjs-folder
- Repository: https://github.com/mihai-vlc/uglifyjs-folder
- Issues: https://github.com/mihai-vlc/uglifyjs-folder/issues
- npm.io page: https://npm.io/package/uglifyjs-folder

## Dependencies (6)

- [meow](https://npm.io/package/meow.md) 9.0.0
- [extend](https://npm.io/package/extend.md) 3.0.2
- [globby](https://npm.io/package/globby.md) 11.1.0
- [mkdirp](https://npm.io/package/mkdirp.md) 1.0.4
- [terser](https://npm.io/package/terser.md) 5.18.1
- [graceful-fs](https://npm.io/package/graceful-fs.md) 4.2.11

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 3.3.0 (latest) — 2023-06-25
- 3.2.0 — 2022-12-29
- 3.1.4 — 2022-10-31
- 3.1.3 — 2022-08-21
- 3.1.2 — 2022-04-03
- 3.1.1 — 2022-04-02
- 3.1.0 — 2022-04-02
- 3.0.0 — 2021-06-21
- 2.0.0 — 2020-07-23
- 1.5.4 — 2020-04-20
- 1.5.3 — 2020-04-18
- 1.5.2 — 2020-01-20
- 1.5.1 — 2018-04-14
- 1.5.0 — 2017-11-25
- 1.4.1 — 2017-11-16
- … 10 more at https://npm.io/package/uglifyjs-folder/versions

## README

# uglifyjs-folder

![tests](https://github.com/mihai-vlc/uglifyjs-folder/actions/workflows/test.yml/badge.svg)

Command to run uglifyjs on a folder and minify the result in a single file or a new folder.
Uses the [terser](https://www.npmjs.com/package/terser) package to perform the minification.

## Getting Started

Install the module with: `npm install uglifyjs-folder -g`

## Documentation

    Usage
      uglifyjs-folder path [options]

    options:
      -c --comments      Add a comment with the file name.
      -o --output        Specify a file/folder to write the minified code
      -e --each          Minify each file independently
      -x --extension     Minified file extension (default: .min.js)
      -p --pattern       Specifies a comma separated glob patterns for the file selections. Default: **/*.js
         --pseparator    Specifies the separator for the pattern input. Default: ,
         --version       Prints the current version from package.json
         --config-file   Specifies a json configuration file for the terser module
         --log-level     Specifies the log level used when processing the files. Default: info
      -h --help          Print this list and exit.

## Examples

    $ uglifyjs-folder test-folder
    $ uglifyjs-folder test-folder --comments
    $ uglifyjs-folder test-folder -o all.min.js
    $ uglifyjs-folder test-folder --output all.min.js --pattern "**/*.js,!**/*min.js" # ignore minified files
    $ uglifyjs-folder test-folder -eo newFolder
    $ uglifyjs-folder test-folder -eo newFolder --log-level error
    $ uglifyjs-folder test-folder-es6 -o newFolder
    $ uglifyjs-folder test-folder -e -x .js -o test-folder # careful: overwrite all files in test-folder
    $ uglifyjs-folder test-folder --config-file "./uglify.json"
    where uglify.json contains
    {
      "keep_fnames": true
    }

## Contributing

Pull requests are appreciated.

## Release History

- 25/Jun/2023

  - Upgraded terser to 5.18.1

- 29/Dec/2022

  - Upgraded terser to 5.16.1

- 31/Oct/2022

  - Fixed the line ending during npm publish. Fixes #34

- 21/Aug/2022

  - Upgraded terser to 5.14.2

- 02/Apr/2022

  - Upgraded terser to 5.12.1
  - Upgraded the development dependencies to the latest version
  - Removed the testing on node v10 from travis ci
  - Fixes #32

- 21/Jun/2021

  - Upgraded terser to 5.7.0
  - Modified the package API from synchronous to async/await
    The cli interface remained the same.

- 23/Jul/2020
  - Released 2.0.0 with the terser minifier.
  - Removed uglify-js and uglify-es from the dependencies.
  - Upgraded all the dependencies to the latest version.
  - Adds snapshots testing to the existing testing suite
  - Adds the --log-level option
- 20/Apr/2020 - Updated code to use promises for the mkdrip call.
- 18/Apr/2020 - Updated the version for the mkdirp package #22
- 25/Nov/2017 - Added support for sourcemaps via the uglifyjs config file  
  Exmaple configuration:

```
{
  "sourceMap": {
    "root": "../src",
    "url": "{file}.map"
  }
}
```

- 11/Nov/2017 - Added support for the --config-file option
- 11/Nov/2017 - Upgraded to uglify-js@3 and uglify-es@3
- 27/Aug/2017 - Added support for the --pattern and --pseparator flags.
- 06/Feb/2017 - Added support for the --harmony flag.
- 28/Dec/2016 - Added support for sub folder output files.
  Example: `uglifyjs-folder test-folder -o newFolder/nested/all.min.js`
- 01/Oct/2016 - Added the --extension flag
- 12/Oct/2014 - Removes the extra files, organizes the code
- 05/Jan/2014 - Initial release

## License

Copyright (c) 2014 - 2020 Mihai Ionut Vilcu
Licensed under the MIT license.

---
_Source: https://npm.io/package/uglifyjs-folder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
