1 |
3a515b92
|
cagy
|
### Version 0.4.0 (2015-11-12) ###
|
2 |
|
|
|
3 |
|
|
- Changed: sourceMappingURL comments used to be matched only when placed at
|
4 |
|
|
the end of the script. However, since several commonly used JavaScript
|
5 |
|
|
libraries do not follow this convention and all popular web browsers accept
|
6 |
|
|
non-trailing comments, this has been revised.
|
7 |
|
|
|
8 |
|
|
So now non-trailing SourceMappingURL comments are matched as well.
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
### Version 0.3.0 (2014-08-16) ###
|
12 |
|
|
|
13 |
|
|
- Changed: sourceMappingURL comments used to be matched only if they appeared
|
14 |
|
|
on their own line. However, the spec only says:
|
15 |
|
|
|
16 |
|
|
> The generated code may include a line at the end of the source, with the following form:
|
17 |
|
|
>
|
18 |
|
|
> //# sourceMappingURL=<url>
|
19 |
|
|
|
20 |
|
|
So now they are matched also when they appear on the same line as code.
|
21 |
|
|
|
22 |
|
|
- Removed: The `.set()` method. I couldn’t decide how it should work
|
23 |
|
|
considering the above change. Moreover, it was unnecessarily complex (and
|
24 |
|
|
would have gotten worse) for very little gain. It is much easier to run
|
25 |
|
|
`.remove()` if needed, and then simply `code += "\n//# sourceMappingURL=" +
|
26 |
|
|
url` (using the appropriate comment syntax and newline). KISS.
|
27 |
|
|
|
28 |
|
|
- Changed: The `.insertBefore()` method now always inserts the string exactly
|
29 |
|
|
before the sourceMappingURL comment; not before the newline before the
|
30 |
|
|
comment (if any). Moreover, it does not ensure that the comment will be on a
|
31 |
|
|
new line anymore. This is up to the caller. KISS.
|
32 |
|
|
|
33 |
|
|
- Changed: The `.remove()` method no longer removes the newline before the
|
34 |
|
|
sourceMappingURL (if any).
|
35 |
|
|
|
36 |
|
|
- Changed: Renamed `.get()` to `.getFrom()`.
|
37 |
|
|
- Changed: Renamed `.remove()` to `.removeFrom()`.
|
38 |
|
|
|
39 |
|
|
- Added: The `.existsIn()` method.
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
### Version 0.2.0 (2014-02-23) ###
|
43 |
|
|
|
44 |
|
|
- Changed: A space is no longer inserted before the closing comment syntax. If
|
45 |
|
|
such a space is desired, it needs to be put in the closing comment syntax
|
46 |
|
|
itself (such as `["/*", " */"]` instead of `["/*", "*/"]`). (Backwards
|
47 |
|
|
incompatible change.)
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
### Version 0.1.0 (2014-02-22) ###
|
51 |
|
|
|
52 |
|
|
- Initial release.
|