ender-builder
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -63,3 +63,2 @@ /*! | ||
, sourceLine = 0 | ||
, sourceColumn = 0 | ||
, sourceNames = [] | ||
@@ -69,19 +68,18 @@ , generateMappings = function (name, content, indent, inline) { | ||
return content.replace(/^.*(\r\n|\r|\n)/mg, function (line, offset) { | ||
return content.replace(/^.*$(\r\n|\r|\n)?/mg, function (line, ending, offset) { | ||
var firstLine = !offset | ||
, sourceIndexDelta = (firstLine ? sourceNames.indexOf(name) - sourceIndex : 0) | ||
, sourceLineDelta = (firstLine ? -sourceLine : 1) | ||
, sourceColumnDelta = -sourceColumn | ||
if (!line.length) return '' | ||
sourceIndex += sourceIndexDelta | ||
sourceLine += sourceLineDelta | ||
sourceColumn = line.length | ||
// VLQ shorthand: A=0, C=1, D=-1 | ||
return ( | ||
'A' + vlq.encode(sourceIndexDelta) // Set the source index | ||
+ vlq.encode(sourceLineDelta) // Set the source line | ||
+ vlq.encode(sourceColumnDelta) + ',' + // Reset the source column | ||
vlq.encode(indent || 0) + ',' + // Map the start of the line | ||
vlq.encode(line.length) + 'AA' + vlq.encode(line.length) + ';' // Map the end of the line | ||
vlq.encode(indent || 0) + // Adjust for indent | ||
vlq.encode(sourceIndexDelta) + // Set the source index | ||
vlq.encode(sourceLineDelta) + // Set the source line | ||
vlq.encode(0) + // Source column (always 0) | ||
(ending ? ';' : '') // Did we have a line ending? | ||
) | ||
@@ -88,0 +86,0 @@ }) |
@@ -31,3 +31,3 @@ /*! | ||
var ast = UglifyJS.parse(files.build, { filename: filenames.build }) | ||
, sourceMap = UglifyJS.SourceMap({ file: filenames.minifiedBuild, orig: files.sourceMap && files.sourceMap.slice(4) }) | ||
, sourceMap = UglifyJS.SourceMap({ file: filenames.minifiedBuild, orig: files.sourceMap }) | ||
, compressor = UglifyJS.Compressor() | ||
@@ -34,0 +34,0 @@ , minifiedBuild |
{ | ||
"name" : "ender-builder" | ||
, "description" : "Build assembler for the Ender CLI" | ||
, "version" : "1.0.4" | ||
, "version" : "1.0.5" | ||
, "authors" : [ | ||
@@ -6,0 +6,0 @@ "Rod Vagg @rvagg <rod@vagg.org> (https://github.com/rvagg)" |
Sorry, the diff of this file is not supported yet
6631734
1191