npm install
node traceur-runner.js main.js
Created
November 13, 2014 09:17
-
-
Save OliverJAsh/0a9fb23dc3ea9bc7914c to your computer and use it in GitHub Desktop.
longjohn interoperability with Traceur call stacks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint esnext: true, node: true */ | |
class Foo { | |
get(){} | |
} | |
var foo = () => { | |
setTimeout(() => { | |
throw new Error('foo'); | |
}, 0); | |
}; | |
var bar = () => { | |
foo(); | |
}; | |
bar(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "traceur-runner.js", | |
"dependencies": { | |
"longjohn": "^0.2.4", | |
"traceur": "0.0.74", | |
"traceur-source-maps": "^1.0.3" | |
}, | |
"devDependencies": {}, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/* jshint node: true */ | |
var traceur = require('traceur'); | |
// require('traceur-source-maps').install(traceur); | |
var path = require('path'); | |
traceur.require.makeDefault(function (modulePath) { | |
var isDependency = modulePath.indexOf('node_modules') !== -1; | |
return ! isDependency; | |
// }); | |
}, { sourceMaps: true }); | |
require(path.resolve(process.cwd(), process.argv[2])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment