This is a date agnostic update to an existing Bootstrap project hoping that not too much has changed since 2014.
You can see the project for yourself and decide whether it is really for you or not.
When I upgraded Bootstrap from version 3.2.x to version 3.7.7, and version 4-alpha especially, the process was similar to trial and error. There were as a sign of slight off-centered wonkiness involved in this document when handling TWBS version 4-alpha. The basic template had changed only so slightly but enough to convince me to use the new shiny version of Twitter Bootstrap for rapid-prototyping…
Apparently, the simple Bootstrap dst package does not include the css for the template example. Thus, in order to obtain the example css files such as the case with narrow jumbotron, I need to copy from the source repository. Once this adjustment is made, the rest falls into place. I have included a directive that will permit you to bring in the assets, too, without fuss.
I probably would’ve preferred to be lazy about the whole thing and use version 3 to this day. But in the end, I opted to take for the path of least resistance. If you absolutely must use version 3, here are some pain points. First, given that you have Bower installed at all, by simply running bower install bootstrap --save-dev for the reasons mentioned earlier will not supply you with the necessary template in order to have closure. You can visit the official Twitter Bootstrap website and get version 3.7 in each the .zip format or in the .tar.gz format.
Here are some suggestions on how to create a local instance presuming that you have each Node & NPM, Git & Bower already installed. You will download my project, then, get familiarized with «npm run [custom_name]», witness how TWBS v 3.7 dst leaves a lot to be desired, before finally taking off for flight!
Let’s get started:
- Download the contents & place them in your present working directory (or pwd for short);
- There are four custom directives in the package.json file under the scripts subsection. In no particular order, you can fire off each command to produce a different result in each case:
- « npm run test » This statement is a result of running npm init, then, answering the questionnaire that follows.
- « npm run berzerker » A generic console statement to get pumped up!
- « npm run bower_init » For any remaining "doubting Toms" out there …
- « npm run twbs4 » This brings in the necessary Bootstrap assets, creates a bower_components directory if one does not exist, then, unload the assets required by gulpfile.js.
- If you wasted no time in utilizing « npm run twbs4 », then, from your pwd type npm install and your dev files will be pulled in according to the contents of package.json.
- Finally, type gulp. This will compile the project and churn away making each previous QWERT count.
You can now open your default browser which should show off the fruits of your labor!