Uglify JS files with glob pattern.
Clone or download
Latest commit 6154004 Nov 2, 2017
Failed to load latest commit information.
@types Version 2.0.0 (#4) Nov 2, 2017
dist Version 2.0.0 (#4) Nov 2, 2017
src Version 2.0.0 (#4) Nov 2, 2017
.gitignore Initial commit. Oct 12, 2016
LICENSE Updated copyright owner. Apr 4, 2017 V1.0.0 (#2) Sep 5, 2017
glob-uglifyjs.config.json Initial commit. Oct 12, 2016
package-lock.json 2.0.0 Nov 2, 2017
package.json 2.0.0 Nov 2, 2017
tsconfig.json V1.0.0 (#2) Sep 5, 2017


Uglify JS files with glob pattern.


$ npm install glob-uglifyjs


  • Uglify js files with node-glob pattern.
  • Remove source files after uglify.

Command line


$ glob-uglifyjs -h


Argument Type Default Description
-h, --help boolean false Show help.
-p, --pattern [*] string Files glob pattern.
-v, --version boolean false Show version number.
-c, --config string glob-uglifyjs.config.json Path to JSON config file.

[*] - argument required.



    "pattern": "/**/*",
    "options": {
        "UseMinExt": false,
        "MinifyOptions": {},
        "OutDir": "dist-min",
        "RootDir": "dist",
        "RemoveSource": false,
        "Debug": false


Property Type Description
pattern[*] string Files glob pattern.
options Options glob-uglifyjs options.

[*] - property required.


Option Type Default Description
UseMinExt boolean true Use min extensions in output files.
MinifyOptions Object {} UglifyJS minify options. Read more.
OutDir string Redirect output structure to the directory.
RootDir string Specifies the root directory of input files.
RemoveSource boolean false Remove all source files specified by glob pattern.
Debug boolean false Show errors details information.
Silence boolean false Silence all messages in console.
Exclude string | string[] undefined Add a pattern or an array of glob patterns to exclude matches. Read more in node-glob options ignore.
Cwd string process.cwd() Current working directory.


Released under the MIT license.