Skip to content

Conversation

@soluml
Copy link

@soluml soluml commented Mar 7, 2014

This option allows you to automatically append the sourceMappingURL comment to the generated JS file. Currently, an option to do this by default in Closure Compiler.

The generated comment will look something like this at the end of the JS file:

//# sourceMappingURL=file.js.map

The sourceMapUrl option can be boolean true if you want to match the generated file's name or you can specify a string and name it whatever you'd like.

soluml added 4 commits March 6, 2014 11:26
Added source map support for this plugin, also added documentation.
Updated to use options object for Source Map generation.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't see the point in this option, should just check for options.create_source_map

@evenicoulddoit
Copy link

From a quick look at the issue, I also think it would be nice, after running the compiler, to append the source map URL to the compiled file, if the option has been set. However, an additional issue which I've found, is that the sources key within the map is relative to the working directory (PWD) from which the compiler is run. This messes up the map and you need to tinker with the sources in order to fix. For note, I'm currently using grunt.contrib.watch to automatically compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants