middleman-jammit¶ ↑
Use Jammit in Middleman - merge multiple javascripts/stylesheets into one
Usage¶ ↑
-
Install
gem install middleman-jammit -v 0.0.2 # for middleman 1.2.7 gem install middleman-jammit -v 0.2.0 # for middleman 2.x
For middleman 3.x you can add it to your Gemfile:
gem 'middleman-jammit'
-
Create your project
middleman 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
middleman server
individual files are used (/javascripts/site.js, /stylesheets/site.css …)
middleman build
packages are used (/assets/all.js and /assets/all.css)
-
Enjoy!