Skip to content

Instantly share code, notes, and snippets.

@jasonsperske
Forked from anonymous/my-bootstrap.bat
Last active December 11, 2015 06:40
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jasonsperske/4560631 to your computer and use it in GitHub Desktop.
Save jasonsperske/4560631 to your computer and use it in GitHub Desktop.
A batch file that can run on a Windows workstation with Node.js, JSHint, Recess, and UglifyJS to compile Twitter Bootstrap
@ECHO OFF
REM
REM 01.17.2013, Requires Node.js, JSHint, Recess, and UglifyJS (installed in the path)
REM Run this command after node.js is installed
REM npm install -g less jshint recess uglify-js
REM
MKDIR bootstrap\img
MKDIR bootstrap\css
MKDIR bootstrap\js
COPY img\* bootstrap\img
CALL lessc less\bootstrap.less > bootstrap\css\bootstrap.css
CALL lessc -x less\bootstrap.less > bootstrap\css\bootstrap.min.css
CALL lessc less\responsive.less > bootstrap\css\bootstrap-responsive.css
CALL lessc -x less\responsive.less > bootstrap\css\bootstrap-responsive.min.css
COPY /B ^
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 bootstrap\js\bootstrap.js
CALL uglifyjs bootstrap\js\bootstrap.js > bootstrap\js\bootstrap.min.js
@jasonsperske
Copy link
Author

Cleaned up the formatting, removed hard path references (the default installation of Node.js includes these tools in your path), and replaced node.exe with CALL which executes the command while continuing to process the script.

@jasonsperske
Copy link
Author

Fixed bug in COPY command where combined file was picking up a junk character at the end, and added responsive.less to the build (also renamed it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment