Welcome to the first Mini Code Adventure, a new series of blog posts and videos that highlight fun and exciting projects that you get running in minutes.
Make a Website with Yeoman!
For our first project we are going to use Yeoman to quickly create a website AND workflow. This is a fantastic starting point for a new website and we’ll be making use of Yeoman in future projects.
Here are the commands, with a short description to the right. (Watch the video for a better explanation of what these commands are doing, or go clone the project to skip the commands and play with the output)
npm install -g yo
npm install -g generator-webapp
yo webapp #Note: Make sure you're in a good dir!
Running “gulp” kicks starts the workflow: downloading additional packages, compiling some necessary files, starting a webserver, firing up a browser pointed to the new site, and even setting up a watcher that will automatically reload the browser whenever we make a change.
Not too shabby for four commands, eh? So…
Congratulations, you have a website! Now what?
Yeoman already set you up with a .gitignore file, so it’s not a bad idea to git init and commit before you start tinkering around in the app folder.
Any changes you make will automatically be reflected in the browser. The Bootstrap website has fantastic examples of how to write great looking (in every sense) HTML.
Once you’ve got something interesting, you can host it for pennies a month, or you can couple it with other technologies to build your own SPA, or Mobile App. Who knows, you could make the next MySpace.
So, that’s it for this session. Go forth, explore, make cool stuff!