Merge lp:~hatch/juju-gui/sourcemap-1248654 into lp:juju-gui/experimental

Proposed by Jeff Pihach
Status: Merged
Merged at revision: 1184
Proposed branch: lp:~hatch/juju-gui/sourcemap-1248654
Merge into: lp:juju-gui/experimental
Diff against target: 12 lines (+1/-1)
1 file modified
lib/merge-files.js (+1/-1)
To merge this branch: bzr merge lp:~hatch/juju-gui/sourcemap-1248654
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+194220@code.launchpad.net

Description of the change

Switch to new sourcemap syntax

The //@ syntax for source maps now causes IE10 to throw
an error. This branch switches to the new //# syntax which
works as expected across Chrome/FF/IE10.

https://codereview.appspot.com/22450044/

To post a comment you must log in.
Revision history for this message
Jeff Pihach (hatch) wrote :

Reviewers: mp+194220_code.launchpad.net,

Message:
Please take a look.

Description:
Switch to new sourcemap syntax

The //@ syntax for source maps now causes IE10 to throw
an error. This branch switches to the new //# syntax which
works as expected across Chrome/FF/IE10.

To QA:
Make and open in chrome, you should see the source as usual.
Open in IE it should not throw two alert errors on load.

https://code.launchpad.net/~hatch/juju-gui/sourcemap-1248654/+merge/194220

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/22450044/

Affected files (+3, -1 lines):
   A [revision details]
   M lib/merge-files.js

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: lib/merge-files.js
=== modified file 'lib/merge-files.js'
--- lib/merge-files.js 2013-09-06 00:26:54 +0000
+++ lib/merge-files.js 2013-11-06 19:56:35 +0000
@@ -66,7 +66,7 @@
      });
      // The uglifyjs script does this instead of the library, so we have to
do
      // it ourselves since we are using uglify as a library and not a
script.
- result.code += '\n//@ sourceMappingURL=' + sourceMapName;
+ result.code += '\n//# sourceMappingURL=' + sourceMapName;
      fs.writeFileSync(outputFile, result.code, 'utf8', throw_error);
      fs.writeFileSync(sourceMapName, result.map, 'utf8', throw_error);
    }

Revision history for this message
Madison Scott-Clary (makyo) wrote :
Revision history for this message
Jeff Pihach (hatch) wrote :
Revision history for this message
Jeff Pihach (hatch) wrote :

*** Submitted:

Switch to new sourcemap syntax

The //@ syntax for source maps now causes IE10 to throw
an error. This branch switches to the new //# syntax which
works as expected across Chrome/FF/IE10.

R=matthew.scott
CC=
https://codereview.appspot.com/22450044

https://codereview.appspot.com/22450044/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/merge-files.js'
2--- lib/merge-files.js 2013-09-06 00:26:54 +0000
3+++ lib/merge-files.js 2013-11-06 20:00:54 +0000
4@@ -66,7 +66,7 @@
5 });
6 // The uglifyjs script does this instead of the library, so we have to do
7 // it ourselves since we are using uglify as a library and not a script.
8- result.code += '\n//@ sourceMappingURL=' + sourceMapName;
9+ result.code += '\n//# sourceMappingURL=' + sourceMapName;
10 fs.writeFileSync(outputFile, result.code, 'utf8', throw_error);
11 fs.writeFileSync(sourceMapName, result.map, 'utf8', throw_error);
12 }

Subscribers

People subscribed via source and target branches