Socket
Socket
Sign inDemoInstall

grunt-map2map

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grunt-map2map

Map one source map to another source map


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
220 kB
Created
Weekly downloads
 

Readme

Source

grunt-map2map

Map one source map to another source map. Why would you want this? Lets say...

  • Compile some Typescript to JavaScript and generate a source map
  • Run compiled JavaScript through Closure Compiler and generate another source map
  • Remap the source map for the obfuscated code back to the original Typescript

Before Use

  • grunt-contrib-uglify already accomplishes this with its sourceMapIn option. Only use this task for cases that do not already have this functionality.
  • This module does not fix any of the problems with source maps generated along with Closure Compiler's ADVANCED_OPTIMIZATIONS. With this option, Closure Compiler can rewrite source so far beyond the original version, that mapping becomes virtually impossible.

Install

npm install grunt-map2map --save-dev

Options

  • sourceMappingURL: string Value to append as sourceMappingURL to generated source file
  • generated: string The location of the source map to remap to original
  • original: string The location of the source map that generated will remap to
  • dest: string The location to save the remapped source map, defaults to generated

Example

grunt.initConfig({
	map2map: {
		options: {
			sourceMappingURL: 'main.final.js.map'
		},
		main: {
			options: {
				generated: 'bin/main.obfuscated.js.map',
				original: 'bin/main.compiled.js.map',
				dest: 'bin/main.final.js.map'
			}
		}
	}
});

Keywords

FAQs

Last updated on 13 Jun 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc