Skip to content

Instantly share code, notes, and snippets.

@mariodev
Created September 12, 2012 14:37
Show Gist options
  • Save mariodev/3707055 to your computer and use it in GitHub Desktop.
Save mariodev/3707055 to your computer and use it in GitHub Desktop.
makefile for twitter bootstrap (Win)
@echo off
set BOOTSTRAP_LESS=./less/bootstrap.less
set BOOTSTRAP_RESPONSIVE_LESS=./less/responsive.less
set BIN_DIR="C:\Program Files (x86)\Git\bin"
%BIN_DIR%\mkdir -p bootstrap/img
%BIN_DIR%\mkdir -p bootstrap/css
%BIN_DIR%\mkdir -p bootstrap/js
%BIN_DIR%\cp img/* bootstrap/img/
call recess --compile %BOOTSTRAP_LESS% > bootstrap/css/bootstrap.css
call recess --compress %BOOTSTRAP_LESS% > bootstrap/css/bootstrap.min.css
call recess --compile %BOOTSTRAP_RESPONSIVE_LESS% > bootstrap/css/bootstrap-responsive.css
call recess --compress %BOOTSTRAP_RESPONSIVE_LESS% > bootstrap/css/bootstrap-responsive.min.css
%BIN_DIR%\cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > bootstrap/js/bootstrap.js
call uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.js
echo "/*!\n* Bootstrap.js by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > bootstrap/js/copyright.js
%BIN_DIR%\cat bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js > bootstrap/js/bootstrap.min.js
%BIN_DIR%\rm bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment