Tag: 源代码地图

WebStorm 7 – Yeoman Angular丢失的源映射`加载资源失败:服务器响应状态为404(Not Found)

使用WebStorm 7.0.1运行yeomanangular发生器grunt服务器抛出: Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/bower_components/jquery/jquery.js.map:0 Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/bower_components/angular/angular.js.map:0 Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-affix.js.map:0 Failed to load resource: the server responded with […]

在Node脚本中生成来自Browserify的源图

嗨我们已经提供了一些代码,但是我们需要尝试并通过browserify来生成站点地图,但我无法弄清楚如何去做,所有的变化我可以从我已经用尽的文档中找出来,所以我显然没有做正确的事情,但无法弄清楚它是什么。 你们能否展示如何通过nodejs脚本中的browserify来生成源代码图。 var b = require('browserify'), fs = require('fs'), path = require('path'), browserify = b({ debug: true }), UglifyJS = require('uglify-js'), lang = process.argv[2] || 'en-gb', _input = path.resolve(__dirname, 'client/app.js'), _output = path.resolve(__dirname, 'bundle.' + lang + '.js'); browserify.add(_input); browserify.transform(require("jadeify")); var bundler = browserify.bundle(), writer = bundler.pipe(fs.createWriteStream(_output)); writer.on('finish', function(){ console.log('finished!'); });

在eval期间移动偏移量(使用sourcemap)

我正在从一个文件中加载一个脚本,我正在使用eval()生成一个如下所示的Javascript代码: var code = fs.readFileSync('myfile'); var shiftedCode= 'function(param) {' + code + '}\n'+ '//# sourceURL=myfile'; eval(shiftedCode) 问题是当我在代码中放置一个断点或debugging器时,它会在正确的一行之后停止两行,因为我想在开头添加字符。 有没有办法将sourceURL转移到正确的起点可能是使用源地图? 预先感谢您的帮助。

用于nodeJS开发的CoffeeScript源地图

现在,CoffeeScript支持新的源地图热度,我想知道是否我也可以使用源地图不只是在我的浏览器,但在开发我的nodeJS应用程序的命令行。 我希望JS编译器给我更多有用的错误跟踪,其中行实际上匹配我的coffeescript文件,而不是编译的JS文件。