An optimized package and gruntfile for rapidly spooling up a static Bootstrap website.
This is a dead-simple setup for developing static HTML or dynamic PHP websites using Bootstrap, Grunt and Livereload.
# Install grunt if you haven't already
npm install -g grunt-cli
# Download or clone the repo.
git clone https://github.com/lacymorrow/init-static.git
# `cd` into the directory and run `npm install` to install Grunt and all of the local dependencies.
cd init-static && npm install;
# Build and update Bootstrap to the latest version and build the initial project with all assets.
# You only need to run `grunt build` to build project dependencies. (optional)
grunt build
# Build project
-
grunt
will build the website and output all files to thedist
directory. -
grunt build
updates Bootstrap and builds dependencies -
grunt serve
will build the website and open thedist
folder in the browser using the grunt-express plugin. It will watch and persist your session as you make changes and save source files using Livereload. Alias:grunt watch
-
Assets have
git pull; npm install; grunt
run to build them and are copied todist/assets
. -
JSHint is run on the gruntfile and
src/js
directory. -
All JS is concated into
dist/js/init.js
and minified intodist/js/init.min.js
. -
LESS is compiled into CSS.
-
CSS is concated, prefixed, combed into
dist/css/init.css
then minified todist/css/init.css
. -
Images in
src/img
are compressed and copied todist/img
-
The
src/app
andsrc/html
directories are copied todist
.