CLI based project structure generator
I'll admit, im really lazy when it comes to development and making files/directories (so you can see why i love rails) but i was recently given a job where it was just a basic HTML/PHP site so no need for rails (sad face) but i didnt want to to make every file one at a time, so i turned to my favourite tool ever the CLI and bash scripting so i wrote a small script which generates a pre populated boilerplate for site development, just run the script and go, it uses HTML5 boilerplate for the index page, and bootstrap CSS and JS libraries aswell as jquery
http://gist.github.com/pluckee/5969679/raw/bc41d3950068f4d586fee58db01c04f5f546841d/struct.sh
cd ~/Desktop/Projects #<--Change This to your own projects directory
mkdir myProject && cd myProject #<--Change myProject to your project name
echo "Generating Assets Pipeline"
mkdir assets
mkdir assets/css
mkdir assets/js
mkdir assets/images
clear
echo "Generating Index File"
wget http://gist.github.com/pluckee/5969679/raw/7352a523fa7afe52c8cf50ab720c23e5f5bc728b/custom.html -O index.html
clear
echo "Downloading latest version of bootstrap to assets pipe"
wget http://raw.github.com/twitter/bootstrap/master/docs/assets/css/bootstrap-responsive.css -O assets/css/bootstrap-responsive.css
clear
wget http://raw.github.com/twitter/bootstrap/master/docs/assets/css/bootstrap.css -O assets/css/bootstrap.css
clear
wget http://raw.github.com/twitter/bootstrap/master/docs/assets/js/bootstrap.min.js -O assets/js/bootstrap.min.js
echo "Downloading jQuery to assets pipe"
wget http://code.jquery.com/jquery-1.10.2.min.js -O assets/js/jquery.min.js
clear
Written by Josh Burns
Related protips
3 Responses
nice script. the wonders of CLI tools and bash. anything to make a project that much more standardized & automated!
Doing that at a wider/higher level would be using Yeoman.
It's basically a piece of software that bootstraps your web application, with a lot more, dependencies resolving, testing and... lots of things to read...
@mrgamer sometimes testing and all that jazz just isn't required like granted if you are building a more complex application, but simple sites and projects just the essentials are nice