Skip to content

Commit

Permalink
v0.3.3 fixes sourceMap output
Browse files Browse the repository at this point in the history
  • Loading branch information
amarcruz committed Oct 23, 2016
1 parent 1922e5c commit 981e48b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes for jscc

### v0.3.3 @ 2016-10-23

- Fixes issue with sourceMap generating incorrect output.

### v0.3.2 @ 2016-10-22

- Fixes an issue with losing location in sourceMap after replacing memvars.
Expand Down
5 changes: 1 addition & 4 deletions lib/jscc.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,8 @@ function preproc (code, filename, options) {
};

if (changes && options.sourceMap) {
var name = filename || null;

result.map = magicStr.generateMap({
source: name,
file: name && ((name.split(/[\\/]/).pop()) + ".map"),
source: filename || null,
includeContent: options.mapContent !== false,
hires: options.mapHires !== false
});
Expand Down
5 changes: 1 addition & 4 deletions lib/jscc.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,8 @@ function preproc (code, filename, options) {
};

if (changes && options.sourceMap) {
var name = filename || null;

result.map = magicStr.generateMap({
source: name,
file: name && ((name.split(/[\\/]/).pop()) + ".map"),
source: filename || null,
includeContent: options.mapContent !== false,
hires: options.mapHires !== false
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jscc",
"version": "0.3.2",
"version": "0.3.3",
"description": "The JavaScript preprocessor for conditional comments and replacements in text files",
"main": "./lib/jscc.js",
"module": "./lib/jscc.es.js",
Expand Down
5 changes: 1 addition & 4 deletions src/preproc.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,8 @@ export default function preproc (code, filename, options) {
}

if (changes && options.sourceMap) {
const name = filename || null

result.map = magicStr.generateMap({
source: name,
file: name && `${name.split(/[\\/]/).pop()}.map`,
source: filename || null,
includeContent: options.mapContent !== false,
hires: options.mapHires !== false
})
Expand Down

0 comments on commit 981e48b

Please sign in to comment.