nippur72 / SourceMaps.CSharp

Source maps in C#
4 stars 1 forks source link

[Question] - Minify javascript #1

Open dazinator opened 7 years ago

dazinator commented 7 years ago

Hello, quick question for you!

I am using a C# version of douglas crockford's JsMin: https://github.com/douglascrockford/JSMin/blob/master/jsmin.c

I would like now to add source map support.

I am wondering, could I use your library to achieve the following:

  1. I'd like to produce a source map for the js .min file (assuming the original source js file doesn't allready have an existing sourcemap).

  2. If the file being minified already has a source map (say it's been generated from a typescript file) - i'd like to produce a source map for the minified file, but the browser should be able to trace from the minified file right back tot he typescript file (i.e through both source maps)

Do you think your library could be used to enable those two steps above, and if so would you happen to know of anything I could look at to get a bit of a head start?

nippur72 commented 7 years ago

unfortunately this library is rather uncomplete, it was just an experiment for the Saltarelle compiler. So I would look elsewhere (but I suspect there are not many written in C#).