Python for Entrepreneurs Transcripts
Chapter: Build web apps with Pyramid: Part 1
Lecture: Concept: Bower
0:01 Let's review using Bower for installing and managing packages in our web application.
0:05 It starts by installing Bower, so notice here we have "npm install bower --upgrade",
0:11 make sure you do that in your home directory or add a "-g"
0:14 to make sure it installs globally, not just for this project.
0:17 Than you could ask "hey, what version of Bower do I have? I have 1.7.9, great".
0:20 Now you could start using Bower to install your dependencies
0:23 so we have "bower install bootstrap-css"
0:26 and that will give us just the distribution version of Bootstrap,
0:30 we can also then install a few other dependencies here we are installing jquery-dist,
0:35 which gives us just the distributed version, not the building blocks for jQuery
0:39 and we also installed Angular.js, because in our theoretical app
0:43 we want to use those three things together.
0:45 Once we've done this, we now have a bower_components folder,
0:48 notice that it's in the static folder of our web app,
0:52 and that we are going to put the Bower components in there,
0:54 we have our three folders that were installed and managed by Bower,
0:57 it has the bower.json file, so it can keep track of versions and whatnot,
1:01 as well as the various things we need, so css,
1:03 fonts and js from our Bootstrap distribution.
1:07 Then we can ask Bower what packages are we using,
1:10 and notice here there is an actual upgrade for Angular.js
1:14 so when we say "bower list", it's kind of like a check for updates
1:17 as well as listing the dependencies.
1:19 Here it doesn't show any linked dependencies between these,
1:22 if there are dependencies, like for example Bootstrap,
1:25 the main distribution is marked to depend upon jQuery
1:28 so those two would be linked in this graph here.