terinjokes/gulp-uglify — pull request #35 by woodcoder (2014-05-12 11:21:43+00:00)
Title: Support inline source maps with sourcesContent

This is a simple change to support inline source maps with sourcesContent (e.g. as produced by Browserify in debug mode). It requires a further change in UglifyJS2 to maintain the sources/sourcesContent data.

It allows this tool chain to work properly (browserify with coffeeify transform being minified):

```javascript
var browserify = require('browserify');
var coffeeify = require('coffeeify');
var stream = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var uglify = require("gulp-uglify");

gulp.task('browserify', function() {
var bundler = browserify({
extensions: ['.coffee']
});
bundler.add('./src/mysource.coffee');
bundler.transform(coffeeify);
return bundler.bundle({debug: true})
.pipe(stream('mysource.min.js'))
.pipe(buffer())
.pipe(uglify({inSourceMap: true, outSourceMap: 'mysource.min.js.map'}))
.pipe(gulp.dest('static/js'));
});
```

This can be tried by adding the following devDependency to a project's `package.json`:
` "gulp-uglify": "git://github.com/woodcoder/gulp-uglify#v0.2.2",`