Skip to content

Uglify JS files with glob pattern.

License

NotificationsYou must be signed in to change notification settings

SimplrJS/glob-uglifyjs

Repository files navigation

glob-uglifyjs

Uglify JS files with glob pattern.

Installation

$ npm install glob-uglifyjs

Features

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

Command line

Usage

$ glob-uglifyjs -h

Arguments

ArgumentTypeDefaultDescription
-h, --helpbooleanfalseShow help.
-p, --pattern [*]stringFiles glob pattern.
-v, --versionbooleanfalseShow version number.
-c, --configstringglob-uglifyjs.config.jsonPath to JSON config file.

[*] - argument required.

Config

Example

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

Properties

PropertyTypeDescription
pattern[*]stringFiles glob pattern.
optionsOptionsglob-uglifyjs options.

[*] - property required.

Options

OptionTypeDefaultDescription
UseMinExtbooleantrueUse min extensions in output files.
MinifyOptionsObject{}UglifyJS minify options. Read more.
OutDirstringRedirect output structure to the directory.
RootDirstringSpecifies the root directory of input files.
RemoveSourcebooleanfalseRemove all source files specified by glob pattern.
DebugbooleanfalseShow errors details information.
SilencebooleanfalseSilence all messages in console.
Excludestring | string[]undefinedAdd a pattern or an array of glob patterns to exclude matches. Read more in node-glob options ignore.
Cwdstringprocess.cwd()Current working directory.

License

Released under the MIT license.