Skip to content

Commit eb5d25d

Browse files
committed
Merge branch '1.X'
2 parents 7637ec5 + 39e1b3b commit eb5d25d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ language: node_js
55
node_js:
66
- 6
77
- 4
8+
- 0.12
89

910
cache:
1011
directories:

index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports.init = function init(options) {
3535
if (options === undefined) {
3636
options = {};
3737
}
38-
debug(() => {return options;});
38+
debug(function () {return options;});
3939

4040
var fileContent = file.contents.toString();
4141
var sourceMap;
@@ -120,7 +120,7 @@ module.exports.init = function init(options) {
120120
}
121121

122122
if (!sourceMap && options.identityMap) {
123-
debug(() => { return 'identityMap'; });
123+
debug(function () { return 'identityMap'; });
124124
var fileType = path.extname(file.path);
125125
var source = unixStylePath(file.relative);
126126
var generator = new SourceMapGenerator({file: source});
@@ -147,7 +147,7 @@ module.exports.init = function init(options) {
147147
} else if (fileType === '.css') {
148148
debug('css');
149149
var ast = css.parse(fileContent, {silent: true});
150-
debug(() => { return ast;});
150+
debug(function () { return ast;});
151151
var registerTokens = function(ast) {
152152
if (ast.position) {
153153
generator.addMapping({
@@ -158,8 +158,8 @@ module.exports.init = function init(options) {
158158
}
159159

160160
function logAst(key, ast) {
161-
debug(() => { return 'key: ' + key;});
162-
debug(() => { return ast[key];});
161+
debug(function () { return 'key: ' + key;});
162+
debug(function () { return ast[key];});
163163
}
164164

165165
for (var key in ast) {
@@ -168,7 +168,7 @@ module.exports.init = function init(options) {
168168
if (Object.prototype.toString.call(ast[key]) === '[object Object]') {
169169
registerTokens(ast[key]);
170170
} else if (Array.isArray(ast[key])) {
171-
debug(() => { return "@@@@ ast[key] isArray @@@@";});
171+
debug(function () { return "@@@@ ast[key] isArray @@@@";});
172172
for (var i = 0; i < ast[key].length; i++) {
173173
registerTokens(ast[key][i]);
174174
}
@@ -226,7 +226,7 @@ module.exports.write = function write(destPath, options) {
226226
if (options.charset === undefined)
227227
options.charset = "utf8";
228228

229-
debug(()=> {return options;});
229+
debug(function() {return options;});
230230
function sourceMapWrite(file, encoding, callback) {
231231
/*jshint validthis:true */
232232

test/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ test('init: should output an error message if debug option is set and sourceCont
408408

409409
var history = [];
410410
console.log('HOOKING');
411-
var unhook = hookStd.stderr((s) => history.push(s));
411+
var unhook = hookStd.stderr(function (s) {history.push(s);});
412412
var pipeline = sourcemaps.init({loadMaps: true, debug: true});
413413

414414
pipeline

test/write.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ test('write: should output an error message if debug option is set and sourceCon
635635
delete file.sourceMap.sourcesContent;
636636

637637
var history = [];
638-
var unhook = hookStd.stderr(s => history.push(s));
638+
var unhook = hookStd.stderr(function(s) {history.push(s);});
639639
var pipeline = sourcemaps.write({debug: true});
640640
pipeline
641641
.on('data', function(data) {

0 commit comments

Comments
 (0)