Use Jammit in Middleman - merge multiple javascripts/stylesheets into one
-
Install
gem install middleman-jammit -v 0.0.2 # for middleman 1.2.7 gem install middleman-jammit -v 0.1.0 # for middleman 2.x
-
Create your project
mm-init your-middleman-project
-
Create config/assets.yml and activate feature in config.rb
cd your-middleman-project; mm-jammit-install
Run with
--help
for options. -
Add this to your views/layout.haml:
= include_stylesheets :all = include_javascripts :all
-
Run server/builder
mm-server
individual files are used (/javascripts/site.js, /stylesheets/site.css …)
mm-build
packages are used (/assets/all.js and /assets/all.css)
-
Enjoy!