You can install the library through the Node Package Manager by running
npm install uglify-js-middleware.
If you are not already using
require() of this library will
return the middleware function directly.
The following options are supported:
dest: Destination directory to place uglified files. If omitted, this will default to match
srcand your generated files will be suffixed with
.ugly.jsrather than just
force: Boolean indicating whether to force uglification to occur on every access.
mangle: Boolean indicating whether variable names should be mangled.
squeeze: Boolean indicating whether the code should be squeezed.
uglyext: Boolean indicating whether to use the
.ugly.jsextension for generated files.
Copyright 2012 Jake Wharton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.