0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Transform AngularJS code in the asset pipeline to be safe for minification.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

middleman-ngmin

middleman-ngmin is an extension for the Middleman static site generator that adds ngmin processing for your JavaScript files to the asset pipeline. This will automatically insert the AngularJS injector annotations to your declarations so that your code can minify correctly.

The code for the Sprockets processor and for bundling ngmin was taken from the ngmin-rails project - it was copied rather than having middleman-ngmin depend on ngmin-rails in order not to bring along a dependency on Rails. Thanks to Jason Morrison and Brandon Tilley for creating ngmin-rails!

Gem Version Build Status Dependency Status Code Quality

Installation

If you're just getting started, install the middleman gem and generate a new project:

gem install middleman
middleman init MY_PROJECT

If you already have a Middleman project: Add gem 'middleman-ngmin' to your Gemfile and run bundle install.

Configuration

activate :ngmin

That's it! Your assets will now be processed.

Versioning

Like ngmin-rails, middleman-ngmin's version number mirrors the version number for the version of ngmin that is bundled with it.

Bug Reports

This project simply plugs ngmin into Middleman! For bugs in ngmin itself, please file issues in ngmin's issue tracker.

Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems: https://github.com/bhollis/middleman-ngmin/issues

The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit Pull Requests containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.

How to Run Cucumber Tests

  1. Checkout Repository: git clone https://github.com/bhollis/middleman-ngmin.git
  2. Install Bundler: gem install bundler
  3. Run bundle install inside the project root to install the gem dependencies.
  4. Run test cases: bundle exec rake test

Upgrading ngmin

The actual ngmin project is bundled into this gem via Browserify. You can update to the latest version of ngmin via Rake:

rake ngmin:build

License

Copyright (c) 2014 Benjamin Hollis. MIT Licensed, see LICENSE for details.