0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Preview what's changed in your Middleman build.
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-diff

Gem Version Build Status

Preview what's changed in your Middleman build.

Installation

Add the extension to your Gemfile,

gem 'middleman-diff'

run bundle install, and activate it in config.rb:

activate :diff

Usage

Preview what's changed since the last build, and optionally use it as the current build:

$ middleman diff
      create  tmp/preview/index.html
 {build => tmp/preview}/index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/index.html b/tmp/preview/index.html
index 68c37b9..218e4ff 100644
--- a/build/index.html
+++ b/tmp/preview/index.html
@@ -5,6 +5,6 @@
   </head>
   <body>
     <h1>Hello there!</h1>
-    <p>This site is kind of alright.</p>
+    <p>This site is awesome.</p>
   </body>
 </html>
Would you like to apply these changes to the build? [y/N] y
Build has been updated.

Configuration

The following configuration options are available:

Name Default Description
build_hooks true Whether to run build hooks when previewing the build
keep :prompt Whether to :always, :never, or :prompt to keep the preview as the build
temp_dir 'tmp' Directory in which to build when previewing