Chapters
18 Chapters
|
1:11:28
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!Compatible PHP versions: >=5.3.3
Subscribe to download the code!Compatible PHP versions: >=5.3.3
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
03.
Sourcemaps
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.6.*", // v2.6.4
"doctrine/orm": "~2.2,>=2.2.3", // v2.4.6
"doctrine/doctrine-bundle": "~1.2", // v1.2.0
"twig/extensions": "~1.0", // v1.2.0
"symfony/assetic-bundle": "~2.3", // v2.5.0
"symfony/swiftmailer-bundle": "~2.3", // v2.3.7
"symfony/monolog-bundle": "~2.4", // v2.6.1
"sensio/distribution-bundle": "~3.0", // v3.0.9
"sensio/framework-extra-bundle": "~3.0", // v3.0.3
"incenteev/composer-parameter-handler": "~2.0", // v2.1.0
"hautelook/alice-bundle": "~0.2" // 0.2
},
"require-dev": {
"sensio/generator-bundle": "~2.3" // v2.4.0
}
}
9 Comments
Congratulations !!! Post simple, objective, direct and functional. No more posts like this one, rare thing!
Whatever I do I can't make sourcemaps work as in the video.
Sourcemaps always gives me 'stdin' as style file, so when I inspect an element I see stdin and not source scss file.
Hey!
I don't remember seeing this problem originally, but I *can* see it now: the sourcemaps incorrectly thinks that the source of *some* selectors os stdin. For me, it looks like it works correctly for any source files that are .scss: the problem is only for source files that are true css files (e.g. bootstrap.css). Do you see the same thing? What I mean is, I can "Inspect Element" on a style that comes from an .scss file and it shows me the proper source. If I do the same for a style that comes originally from a CSS file, that's when I see the stdin.
Thanks!
I opened an issue to track this problem: https://github.com/knpunive...
Ok cool.
Ryan,
For me it's the other way around: everything works as excepted with *.css files but not with scss files. I suspect it works with less too, but I havent fully tested this. I say this because including bootstrap.css with scss files does show source bootstrap less files.
For example, when I comment .pipe(plugins.sass()) from addStyle function and load css files sourcemaps work as expected.
Strangely, as soon as I use scss files (with .pipe(plugins.sass()) and write style it switches to stdin. To clearify:
In style.scss:
.some-dino-class {}
.some-other-thingie {}
works.
main.css.map gives: {"version":3,"sources":["bootstrap.css","font-awesome.css","layout.scss","style.scss"]....
When I do (with or without variables):
.some-dino-class {
font-size: bigger;
}
.some-other-thingie { color: red }
It breaks.
main.css.map gives: {"version":3,"sources":["bootstrap.css","font-awesome.css","../../../stdin","../../../stdin"]....
At first I thought it has something to do with my project (maybe I overlooked something), but I downloaded the course source files with same results.
I've got this on my list to look into - definitely not just your issue :)
do we have to link ".css.map" file in the html ?
Hey Sandeep,
You don't have too, because this files needed only for debugging, i.e when you inspect an element whose styles are provided by a generated CSS file, the Elements panel displays a link to the original source file, not the generated .css file. But it's a good idea to link them, because your debugging experience will be easier.
Cheers!
"Houston: no signs of life"
Start the conversation!