GithubHelp home page GithubHelp logo

middleman-jammit's Introduction

middleman-jammit

Use Jammit in Middleman - merge multiple javascripts/stylesheets into one

Usage

  1. 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'
    
  2. Create your project

    middleman init your-middleman-project
    
  3. Create config/assets.yml and activate feature in config.rb

    cd your-middleman-project; mm-jammit-install
    

    Run with --help for options.

  4. Add this to your views/layout.haml:

    = include_stylesheets :all
    = include_javascripts :all
  5. 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)

  6. Enjoy!

middleman-jammit's People

Contributors

matt-hh avatar radius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

radius swr

middleman-jammit's Issues

issues with middleman 2.0?

I've tried to upgrade to middleman 2 but I couldn't get middleman-jammit to work. All I got was this message:

/Library/Ruby/Gems/1.8/gems/middleman-2.0.0.3/lib/middleman/core_extensions/features.rb:82:in
`new': /Library/Ruby/Gems/1.8/gems/middleman-jammit-0.1.0/lib/middleman-jammit.rb:10:in
`registered': uninitialized constant Middleman::Server (NameError)

any ideas?

  • naltatis

Jammit as rake process?

Hi Matt,
I'm interested in using middleman jammit as part of a rake process and not as part of a middleman build. In other words, I only want to process css/js and not the html from my site.

I get the impression that middleman-jammit relies on the middleman build process to function properly, is this correct?

Is there a way to trigger jammit through rake without building the rest of the middleman site?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.