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!
02.
Sass to CSS
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
}
}
17 Comments
Hi Ryan,
trying to follow the tutorial, I downloaded the project and started the base project. As usual, then, some
composer install
app/console doctrine:database:create
app/console doctrine:schema:create
app/console doctrine:fixtures:load
app/console assets:install --symlink
app/console assetic:dump
and finally
app/console server:run
Opening the page, though, there is no vendor/bootstrap folder, and so the page is even uglier than yours :). Am I missing something?
Thanks,
Pietro
Autoanswer: the missing step is
bower install
You got it! I just updated the README with these installation instructions (note: the assetic:dump isn't needed for this project). I'll start making sure we have these for *every* project.
Thanks!
I tried to setup the project, downloaded your code, using dir "start", then i read all the steps in README but when i look for the site in http;//localhost:8000 symfony says "No route found for "GET /". What's i'm wrong?
Hi Andrea!
Hmm. The fact that you see the error means that Symfony *is* running correctly. What happens if you run "app/console router:debug" from the terminal? Do you see the dinosaur_list route in the list?
Also, you could try starting the web server on a different port - e.g.
app/console server:run localhost:9002
Then go to http://localhost:9002. I'm wondering if you have some other Symfony app already running on port 8000, so you're seeing this *other* app instead :).
Let me know!
Yes you right.
The second one is the right answer.
Thanks a lot.
Where is this bootstrap css from? Its not in your start code. post edit: did I need to do a "bower install"? I dont think this was mentined til now.
Hey maxii123!
You are right, we forgot to talk about running "bower install"
Thanks for letting us know, we will add a note as soon as we can.
Cheers!
My error. It was indeed listed as a task in the readme. Apologies.
Hey Konrad,
The "sudo npm install gulp-sass --save-dev" command shouldn't create a web/css directory - it just add a new dependency to your package.json file and download it locally. Probably "gulp" command will create it, but I'm not sure, maybe you should create this directory manually. And when it will be exist, "gulp" command will write there CSS files.
Cheers!
Got it thx!
how to servw the application? "gulp serve" doesn't work.
Hey Konrad Zając
Did you install gulp globally ?
Could you show me the error message you are getting ?
When you run "gulp task_name" this by default will open any gulpfile.js file which lives in the same directory where you ran the command, and it will try to find and execute the given task name.
Have a nice day!
Firstly I did instalI gulp globally.
Secondly there's no error per se.
I know all that, but there's no serve task in the gulpfile.js in the "start" directory - there's no error, but I'm supposed to see the dinosaurs...
Hey Konrad Zając
I can't find that "serve" task either (maybe in a further chapter?) but you should be able to load the page without it, you just need to follow the steps in the README and then hit the page
Cheers!
I don't think I should just continue without the server the next chapter "sourcemaps" requires inspecting the graphical site.
Yo Konrad Zając!
I think I may know why everyone is so confused :).You're 100% correct that there is no "serve" task in gulpfile.js in the "start" code download. That's because we're not using gulp to serve the site in this tutorial: we use the built-in PHP web server in Symfony (app/console server:run). I noticed that we do a poor job of mentioning that in the tutorial itself (my apologies - we do a much better job in all of our more recent tutorials). We do mention this in the README.md file that's in the code download, which you can also see here: https://github.com/knpuniversity/gulp/blob/master/README.md#installation
So, try
app/console server:runinstead. You can of course make your own gulp serve command - but because we're using a PHP application as our "backend", we're using the PHP web server.Cheers!
"Houston: no signs of life"
Start the conversation!