mikach / gulp-concat-sourcemap

Concatenate files and generate a source map file.
30 stars 9 forks source link

Support gulp-sourcemaps #8

Closed mariusGundersen closed 10 years ago

mariusGundersen commented 10 years ago

gulp-sourcemaps seems like the official way to handle sourcemaps for gulp plugins. It adds a sourcemap property to the vinyl file, so plugins can accept and produce sourcemaps in a standard way.

Unfortunately gulp-concat-sourcemap does not follow this specification. It would be great if it could detect the sourcemap property on the incoming files, and if present, attach the sourcemap to the outgoing concatenated file. This way the concatenated file can be piped to other sourcemap aware plugins, like uglify.

mariusGundersen commented 10 years ago

Related would be the ability to accept sourcemaps and concatenate them before sending them along with the output file

Psvensso commented 10 years ago

If i get their specc correct they should all be concatenated into one .map file right? Or should the attached .sourceMap be extracted and concatenated together with their source file?

This just gives me some concern about load size since then the user cant choose to load individual map files. (depending on the above)

Psvensso commented 10 years ago

Well i guess "merging it with preexisting source maps" gives me the answer to my own question.... https://github.com/floridoo/vinyl-sourcemaps-apply

Psvensso commented 10 years ago

Reading his source made it pretty obvious whats needed.

Think this could be very usefull and pretty straight forward to support.

mariusGundersen commented 10 years ago

I've already started to look into it, and I'll submit a pull-request as soon as the tests show that everything is working correctly.

Psvensso commented 10 years ago

Nice