source-maps

My source-mapped breakpoints aren't working correctly in Google Chrome

无人久伴 提交于 2019-11-29 10:57:54
问题 I have created a concatenated, minified file through the Node.js wrapper for Google Closure Compiler. When I open the Developer Tools in Google Chrome, both the source map and the mapped files all load appropriately. A problem I'm having is that breakpoints aren't triggering in the source map files like they would running an unminified, separate-file session. Sometimes I'll try to place a breakpoint in a script and it will jump several lines down rather than where I'm trying to set it. But

Source maps with grunt

杀马特。学长 韩版系。学妹 提交于 2019-11-29 02:21:48
Do you know of a workflow that includes source maps for an app compiled with grunt? I am well aware of plugins like uglifyjs that allow you to simply generate a source map. But I'm looking for incorporating this into a more complex workflow, rather than just making a one-off source map. I've noticed that the most popular Yeoman generators (that I know of) are missing source maps in their workflows. Is this just because of a lack of support in the major plugins for source maps? Or is it instead that source maps aren't necessary in work flows, and I just can't think of a clever enough

Source map is not visible at Chrome network tab

Deadly 提交于 2019-11-29 01:25:09
Before Google Chrome update I saw source map files at Chrome Devtools on Network tab. Now, after update to version 43.0.2357.134 m I don't see them. Maybe my code is wrong? Or it's done intentionally to hide those source maps? Now (1/10/2016) it looks like there is a way to get this information by searching for "map" in chrome://net-internals/#events This was a side-effect of fixing bug 362913 which was a feature request being tracked in issue 465032 . If you have a need for seeing the map files then please file a new issue for it and explain the use-case for why you need it. 来源: https:/

Combine source maps of two compilation steps

丶灬走出姿态 提交于 2019-11-28 20:22:18
I've got a two-step compilation process for my web application. Firstly, I compile CoffeeScript files into JavaScript files [1]. Then the JavaScript files (both ones that come from CoffeeScript, and external ones, like produced from AngularJS templates by grunt-angular-templates ) are compiled by Google Closure Compiler [2] into a single minimized file. CoffeeScript ---[1]---> JavaScript --[2]--\ \-> AngularJS templates --> JavaScript ----------> single minimized JS file /-> other JS files -------/ Both steps [1] and [2] produce source maps. Is it possible to combine these source maps into a

Generating source maps for multiple concatenated javascript files compiled from Coffeescript

Deadly 提交于 2019-11-28 19:35:22
Has any one had any success with this? Myrne Stol I think it's more or less an unsolved problem: https://github.com/jashkenas/coffee-script/issues/2779 . Last meanigingful comment was from jwalton, a month ago. Still, it doesn't seem rocket science to add support for it, so it will probably come soon. Michael Ficarra (creator of CoffeeScript Redux) suggested using https://github.com/michaelficarra/commonjs-everywhere . Two caveats: It only works for bundling CommonJS modules. It uses CoffeeScript Redux, which is still in beta (although working quite well it seems), and not 100% compatible with

AngularJS - Stack trace ignoring source map

孤人 提交于 2019-11-28 18:14:44
I've written an AngularJS app but it's proving a bit of a nightmare to debug. I'm using Grunt + uglify to concatenate and minify my application code. It also creates a source map alongside the minified JS file. The source map seems to work properly when there is a JS error in the file, but outside of the AngularJS application. e.g. If I write console.log('a.b'); at the top of one of the files, the error logged in the Chrome debugger displays line + file info for the original file, not the minified one. The problem occurs when there is a problem with code that Angular runs itself (e.g. in

Source maps files in production - Is it safe? [closed]

半城伤御伤魂 提交于 2019-11-28 17:22:48
I'm using UglifyJS to minify and uglify my sources, and Sentry to report errors from my production environment. In order to get errors from Sentry, in a readable manner, I need to add source-map Is it safe to do it in production servers, or the source-maps files should only exist on staging environment? Is there a way to secure them on production environment? John Bernardsson Searching for a possible solution to this, and if someone is not specifically using Sentry, I got to this blog post (ironically a Sentry blog post): https://blog.sentry.io/2015/10/29/debuggable-javascript-with-source-maps

Grunt concat + uglify with sourcemaps

蓝咒 提交于 2019-11-28 17:14:06
I use concat to merge JS files into one file and uglify to minimize the JavaScript. How can I create a sourcemaps file that uses the source JS files? My current gruntfile: concat: { options: { // define a string to put between each file in the concatenated output separator: ';' }, dist: { // the files to concatenate src: ['<%= config.src %>/js/**/*.js'], // the location of the resulting JS file dest: '<%= config.dist %>/js/main.js' } }, uglify: { dist: { files: { '<%= config.dist %>/js/main.min.js': ['<%= concat.dist.dest %>'] } } }, Damon Friendship You need to enable source maps on both the

Compile LESS files with source maps

心已入冬 提交于 2019-11-28 10:57:14
How can I compile a LESS file to output a source map file ( .css.map ) in addition to a CSS file? Is there a way to do it on both command line (NodeJS's lessc ) and on any GUI-based programs? Update: New shortest answer The docs have been updated! As new features hit LESS, sometimes the docs lag behind a bit, so if you're looking for bleeding-edge features, you're still probably better off running lessc (see longer answer) and checking what pops out of the help text. http://lesscss.org/usage/ Short answer You're looking for any number of the following options from the command line: --source

Gulp-generated source maps don't work in Chrome

守給你的承諾、 提交于 2019-11-28 07:17:14
问题 Apart from enabling source maps in Chrome, in my gulpfile.js I use errLogToConsole: true, sourceComments: 'map', sourceMap: 'sass' as arguments when calling sass based on this answer: gulp.task('sass', function() { return gulp.src('../assets/styles/**/*.scss') .pipe(plumber({ errorHandler: onError })) .pipe(sass({errLogToConsole: true, sourceComments: 'map', sourceMap: 'sass'})) .pipe(autoprefixer()) .pipe(gulp.dest('../dist/styles')) .pipe(browserSync.reload({ stream: true })) }); Yet SCSS