Package Exports
- pull-uglify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pull-uglify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pull-uglify
Uglify JavaScript files with pull-stream
Compiles streamed files with uglify-js
pull(
read([ 'index.js', 'test.js' ], { cwd: __dirname }),
uglify({ mangle: true }),
write('out', err => {
// done
})
)
You can also compile buffers with uglify.buffer
if you aren't streaming files
Install
npm install --save pull-uglify
# with yarn
yarn add pull-uglify
Usage
uglify(options?)
A stream that maps each file to the uglified version. See uglify-js
's options for more information.
pull(
read([ 'index.js', 'lib/**/*.js' ], { cwd: __dirname }),
bundle('app.js', [ 'es2040' ]),
uglify({ mangle: true }),
write('out', err => {
// ...
})
)
uglify.buffer(options?)
The base implementation that compiles buffer to buffer, instead of file to file. Options are the same
pull(
readFile('foo.js'),
uglify.buffer({ mangle: true }),
writeFile('foo.min.js')
)
Maintained by Jamen Marz (See on Twitter and GitHub for questions & updates)