https://github.com/simplrjs/glob-uglifyjs
Uglify JS files with glob pattern.
https://github.com/simplrjs/glob-uglifyjs
glob glob-pattern glob-uglifyjs uglify-files uglifyjs uglifyjs-folder
Last synced: 11 months ago
JSON representation
Uglify JS files with glob pattern.
- Host: GitHub
- URL: https://github.com/simplrjs/glob-uglifyjs
- Owner: SimplrJS
- License: mit
- Created: 2016-10-12T13:17:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-02T18:40:14.000Z (over 8 years ago)
- Last Synced: 2025-03-28T03:32:32.633Z (12 months ago)
- Topics: glob, glob-pattern, glob-uglifyjs, uglify-files, uglifyjs, uglifyjs-folder
- Language: TypeScript
- Homepage:
- Size: 67.4 KB
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
glob-uglifyjs
===========
Uglify JS files with glob pattern.
## Installation
```sh
$ npm install glob-uglifyjs
```
## Features
- Uglify `js` files with [node-glob](https://github.com/isaacs/node-glob) pattern.
- Remove source files after uglify.
## Command line
### Usage
```sh
$ glob-uglifyjs -h
```
### Arguments
| 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.
## Config
### Example
```json
{
"pattern": "/**/*",
"options": {
"UseMinExt": false,
"MinifyOptions": {},
"OutDir": "dist-min",
"RootDir": "dist",
"RemoveSource": false,
"Debug": false
}
}
```
### Properties
| Property | Type | Description |
|-------------------------|---------------------|------------------------|
| pattern[*] | string | Files glob pattern. |
| options | [Options](#options) | glob-uglifyjs options. |
[*] - property required.
### Options
| Option | Type | Default | Description |
|-----------------|--------------------|-----------------|------------------------------------------------------------------------------------|
| UseMinExt | `boolean` | `true` | Use `min` extensions in output files. |
| MinifyOptions | `Object` | `{}` | UglifyJS minify options. [Read more](https://github.com/mishoo/UglifyJS2). |
| 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](https://github.com/isaacs/node-glob#options) `ignore`. |
| Cwd | `string` | `process.cwd()` | Current working directory. |
## License
Released under the [MIT license](LICENSE).