This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
30 mins into the latest "JavaScript Jabber" podcast, Paul Irish (who works on the Chrome Dev tools) mentioned that they would be implementing "Source Mapping", a way of defining where the un-minified source code is, and using the un-minified source for debugging. I believe that this is also being done by Mozilla. This is extremely new info, but I know that MindScape is currently working on minification tools for JS, and I just wanted to bring the spec proposal and this implementation to your attention. edit: note this can be manually enabled in Chrome Canary dev tools, via the 'gears' button in the bottom right. |
|
|
Now that Chrome has implemented Source Maps, has there been any word on Web Workbench adding support? |
|
|
Hi, What sort of support are you looking for? Depending on the language you're using you can generate source maps now with Web Workbench. Let me know what framework you're using (LESS, SCSS or Compass) and I'll let you know how to do it. Kind regards, John-Daniel Trask |
|
|
I'm using SCSS... I found the option for CoffeeScript after I posted here, but wasn't able to find any other source map options. Thanks! |
|
|
Ah, thanks for that. So the current production version of SCSS doesn't support source maps -- but the beta does. It's been in beta for a while and we typically don't ship updates until they come out of beta (a lot of people depend on Web Workbench). So at present you can't do it with SCSS unfortunately. I'll take a look and see if I can figure out when it might ship from them. John-Daniel |
|
|
As an option you can manually update to use the beta Sass 3.3 gem and you can do this by using a custom Ruby installation with Web Workbench. To achieve this you will want to set up a new Ruby installation somewhere locally and then install the Sass 3.3 gem. You may also need to install the Compass gem and sassy-math if you are using Compass. You can then set the path for WW to use to point to that installation by going to Tools/Options/Web Workbench and setting the "Ruby Installation Path" property to point to the bin folder in your install.
|
|
|
Will you be adding Source Map support for LESS files? |
|
|
Yes we are currently just completing testing on this, and we are aiming to have this out as part of the next gallery release which will be later this week.
|
|
|
Hello Source map support for LESS is now available in the current nightly build, and the latest build on the Visual Studio gallery. To enable source maps, use the new "Produce source map file" option under the "LESS" category of the Web Workbench options. -Jason Fauchelle |
|
|
I've been trying to figure out how to use it... I'm very new to source map files, but I know what they do. How do I use this so it shows up in Chrome for me? Do I include the map file in my head or something? Thanks |
|
|
If you have source map compilation enabled then you will have a .map file generated alongside your .less file and your .css file should contain a comment at the bottom of the file which refers to the map file. The browser picks this up and will then try and download the map file (which in turn specifies source files which were used and those then need to be fetched etc). So having all the files (.css, .map and .less) in the same relative location and checking that the comment is present in the .css file should be all thats required, the browser should do the rest. If its not showing up check what network requests are being made as this will help you understand what its failing to fetch.
|
|