You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you should be able to use this to go over the nodes and grab original input information.
What you don't know is the target (css) line number.
To do that I would suggest having functions on the toCSS env object which build up the css and keep track of the current line number. You can then store that line number against the node.
i'm not good at compiler theory (in fact i am at this course at college now) and haven't looked up less' code, but can't just write to a variable say, lineNumber and at each line break increment it? it should keep the line number state, after that it could be exposed to the function mapping the lines.
yes.. that is this bit of the implementation I described.
having functions on the toCSS env object which build up the css and keep track of the current line number.
you need to keep track of the line number on the env object but also store its current value against each node as you output the css, then the ast has the source and the target line numbers and a mapping can be made.
So what are you going to do? Drop the first one and let only '-source-map-inline` do the right thing? (embed original css into the sourcemap itself and point the url on the resulted css to it) ?
This yields a web/assets/site/css/bootstrap/bootstrap-full.css.map, and in the web/assets/site/css/bootstrap/bootstrap.full.css, the last line reads /*# sourceMappingURL=/bootstrap-full.css.map */
It should read /*# sourceMappingURL=/assets/site/css/bootstrap/bootstrap-full.css.map */
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1050#issuecomment-26195647
.
Should the source map live with the compiled CSS or with the LESS files? All of the examples I've seen have the generated CSS, LESS and index.html all in the same dir. I think many people often have a separate folder for LESS and CSS. Something like this:
i think it should go where it fits your code/management style. for me it
would be in the map folder inside the public directory of my app (my less
files are not in the public directory of the app, it's elsewere).
Marco Aurélio D. Campos
Instituto de Computação - UFMT
Should the source map live with the compiled CSS or with the LESS files?
All of the examples I've seen have the generated CSS, LESS and index.html
all in the same dir. I think many people often have a separate folder for
LESS and CSS. Something like this:
That makes me feel like maybe I'm going against the grain. Is there a best
practice around where these things should live?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1050#issuecomment-29043445
.
I've got the source map working using node.js/grunt but I've found that if I nest an import inside a rule, then all rules inside the imported file are reported as being at the file and line number of the nesting rule.
Activity
uzikilon commentedon Jan 17, 2013
+1
gabeins commentedon Jan 17, 2013
👍
mrdevinmob commentedon Jan 17, 2013
+1
matthew-dean commentedon Jan 18, 2013
+2
madcampos commentedon Feb 16, 2013
+1
Soviut commentedon Feb 16, 2013
+1, obviously!
EarMaster commentedon Feb 27, 2013
+1
aredridel commentedon Feb 27, 2013
+1
lukeapage commentedon Feb 27, 2013
if anyone wants to work on this
https://github.com/cloudhead/less.js/tree/import-interpolation
now has a visitor pattern implemented.
you should be able to use this to go over the nodes and grab original input information.
What you don't know is the target (css) line number.
To do that I would suggest having functions on the toCSS env object which build up the css and keep track of the current line number. You can then store that line number against the node.
After that it should be simple.
madcampos commentedon Feb 27, 2013
i'm not good at compiler theory (in fact i am at this course at college now) and haven't looked up less' code, but can't just write to a variable say,
lineNumberand at each line break increment it? it should keep the line number state, after that it could be exposed to the function mapping the lines.lukeapage commentedon Feb 27, 2013
@madcampos
yes.. that is this bit of the implementation I described.
you need to keep track of the line number on the env object but also store its current value against each node as you output the css, then the ast has the source and the target line numbers and a mapping can be made.
jyonker commentedon May 22, 2013
+1
matthew-dean commentedon Jun 4, 2013
lol, we're all for it, looks like we just need an adept JavaScript / LESS programmer to fix it up and do a pull request. ;-)
ivan4th commentedon Jun 7, 2013
+1 very important feature
ChrisCinelli commentedon Jun 10, 2013
You may want to use the SourceMapGenerator here: https://github.com/mozilla/source-map
96 remaining items
lukeapage commentedon Oct 4, 2013
hrmm its currently undocumented
--source-map=inline
is how to do it.
lukeapage commentedon Oct 4, 2013
yes might be better to give its own option.. its a bit confusing having to do
they are too similiar!
dotnetwise commentedon Oct 4, 2013
So what are you going to do? Drop the first one and let only '-source-map-inline` do the right thing? (embed original css into the sourcemap itself and point the url on the resulted css to it) ?
aredridel commentedon Oct 9, 2013
I get the wrong paths in 1.5.0-b4 when I use basepath and rootpath:
This yields a
web/assets/site/css/bootstrap/bootstrap-full.css.map, and in theweb/assets/site/css/bootstrap/bootstrap.full.css, the last line reads/*# sourceMappingURL=/bootstrap-full.css.map */It should read
/*# sourceMappingURL=/assets/site/css/bootstrap/bootstrap-full.css.map */pgasiorowski commentedon Oct 12, 2013
Greetings. In 1.5.0-b4 while changing styles from debugger the mapping is lost. Is this correct behavior?
Please see the screenshot:

scarlac commentedon Oct 12, 2013
@WooDzu it's a Chrome bug. Safari 6.1 does not have this glitch.
madcampos commentedon Oct 12, 2013
@WooDzu fire a bug to chrome if there is none, this two might be of intrest:
https://code.google.com/p/chromium/issues/detail?id=266416&q=sourcemap&colspec=ID%20Pri%20M%20Iteration%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified
https://code.google.com/p/chromium/issues/detail?id=273384&q=sourcemap&colspec=ID%20Pri%20M%20Iteration%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified
or you can search for something diferent:
https://code.google.com/p/chromium/issues/list
Marco Aurélio D. Campos
Instituto de Computação - UFMT
2013/10/12 Seph Soliman [email protected]
pgasiorowski commentedon Oct 14, 2013
Thanks @scarlac and @madcampos I decided to fire a separate ticket for this as the other 2 are not directly related to the issue. Reference: https://code.google.com/p/chromium/issues/detail?id=307146
umaar commentedon Oct 22, 2013
Demo page: http://umaar.github.io/bootstrap-source-map-example/ (and animation)
blittle commentedon Oct 23, 2013
I am super excited about source map support! One thing that would be really nice to support is a way to drop directories from the file path prefixes within the sourcemaps. This is supported in uglifyjs sourcemaps and is very useful: https://github.com/gruntjs/grunt-contrib-uglify#sourcemapprefix
mquandalle commentedon Nov 4, 2013
Is there a way to get the sourcemap from the node/npm module in javascript?
robdodson commentedon Nov 22, 2013
Should the source map live with the compiled CSS or with the LESS files? All of the examples I've seen have the generated CSS, LESS and index.html all in the same dir. I think many people often have a separate folder for LESS and CSS. Something like this:
If I want my map file to live in
css/I have to use a bunch of settings to iron it all out.That makes me feel like maybe I'm going against the grain. Is there a best practice around where these things should live?
madcampos commentedon Nov 22, 2013
i think it should go where it fits your code/management style. for me it
would be in the
mapfolder inside the public directory of my app (my lessfiles are not in the public directory of the app, it's elsewere).
Marco Aurélio D. Campos
Instituto de Computação - UFMT
2013/11/21 Rob Dodson [email protected]
aBrookland commentedon Dec 3, 2013
I've got the source map working using node.js/grunt but I've found that if I nest an import inside a rule, then all rules inside the imported file are reported as being at the file and line number of the nesting rule.
So if file1.less contains:
and file2.less contains:
And HTML like:
Then when inspecting the span it shows up as being line 1 of file1.less not line 1 of file2.less.
vdegenne commentedon Mar 25, 2015
Grunt, all the best ~!