Adds note on global_defs options for UglifyJS.Compressor to README.md.
This commit is contained in:
parent
c28e1a0237
commit
c905f48bb6
13
README.md
13
README.md
|
|
@ -263,6 +263,19 @@ will evaluate references to them to the value itself and drop unreachable
|
|||
code as usual. The possible downside of this approach is that the build
|
||||
will contain the `const` declarations.
|
||||
|
||||
You can also define variables via the API (if UglifyJS is being called
|
||||
from a JavaScript file, for instance). Just supply the values to
|
||||
`UglifyJS.Compressor`:
|
||||
|
||||
```javascript
|
||||
var compressor = UglifyJS.Compressor({
|
||||
global_defs: {
|
||||
DEBUG: false,
|
||||
PRODUCTION: true
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
<a name="codegen-options"></a>
|
||||
## Beautifier options
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user