diff --git a/middleman-core/fixtures/ember-cli-app/config.rb b/middleman-core/fixtures/ember-cli-app/config.rb
new file mode 100644
index 00000000..4e761958
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/config.rb
@@ -0,0 +1,5 @@
+activate :external_pipeline,
+ name: :ember,
+ command: "cd test-app/ && ember #{build? ? :build : :serve} --environment #{config[:environment]}",
+ source: "test-app/dist",
+ latency: 2
\ No newline at end of file
diff --git a/middleman-core/fixtures/ember-cli-app/source/javascripts/file.js b/middleman-core/fixtures/ember-cli-app/source/javascripts/file.js
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/.bowerrc b/middleman-core/fixtures/ember-cli-app/test-app/.bowerrc
new file mode 100644
index 00000000..6866ac2c
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory": "vendor"
+}
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/.gitignore b/middleman-core/fixtures/ember-cli-app/test-app/.gitignore
new file mode 100644
index 00000000..f4d4f1f6
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/.gitignore
@@ -0,0 +1,17 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+
+# dependencies
+/node_modules
+/vendor/*
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage/*
+/libpeerconnection.log
+npm-debug.log
+testem.log
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/.jshintrc b/middleman-core/fixtures/ember-cli-app/test-app/.jshintrc
new file mode 100644
index 00000000..53b0c0b2
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/.jshintrc
@@ -0,0 +1,32 @@
+{
+ "predef": {
+ "document": true,
+ "window": true,
+ "TestAppENV": true
+ },
+ "browser" : true,
+ "boss" : true,
+ "curly": true,
+ "debug": false,
+ "devel": true,
+ "eqeqeq": true,
+ "evil": true,
+ "forin": false,
+ "immed": false,
+ "laxbreak": false,
+ "newcap": true,
+ "noarg": true,
+ "noempty": false,
+ "nonew": false,
+ "nomen": false,
+ "onevar": false,
+ "plusplus": false,
+ "regexp": false,
+ "undef": true,
+ "sub": true,
+ "strict": false,
+ "white": false,
+ "eqnull": true,
+ "esnext": true,
+ "unused": true
+}
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/Brocfile.js b/middleman-core/fixtures/ember-cli-app/test-app/Brocfile.js
new file mode 100644
index 00000000..a69fc99b
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/Brocfile.js
@@ -0,0 +1,20 @@
+/* global require, module */
+
+var EmberApp = require('ember-cli/lib/broccoli/ember-app');
+
+var app = new EmberApp();
+
+// Use `app.import` to add additional libraries to the generated
+// output files.
+//
+// If you need to use different assets in different
+// environments, specify an object as the first parameter. That
+// object's keys should be the environment name and the values
+// should be the asset to use in that environment.
+//
+// If the library that you are including contains AMD or ES6
+// modules that you would like to import into your application
+// please specify an object with the list of modules as keys
+// along with the exports of each module as its value.
+
+module.exports = app.toTree();
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/README.md b/middleman-core/fixtures/ember-cli-app/test-app/README.md
new file mode 100644
index 00000000..d78534a8
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/README.md
@@ -0,0 +1,25 @@
+# Test-app
+
+This README outlines the details of collaborating on this Ember application.
+
+## Installation
+
+* `git clone` this repository
+* `npm install`
+* `bower install`
+
+## Running
+
+* `ember server`
+* Visit your app at http://localhost:4200.
+
+## Running Tests
+
+* `ember test`
+* `ember test --server`
+
+## Building
+
+* `ember build`
+
+For more information on using ember-cli, visit [http://iamstef.net/ember-cli/](http://iamstef.net/ember-cli/).
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/app.js b/middleman-core/fixtures/ember-cli-app/test-app/app/app.js
new file mode 100644
index 00000000..b672d2b4
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/app/app.js
@@ -0,0 +1,14 @@
+import Ember from 'ember';
+import Resolver from 'ember/resolver';
+import loadInitializers from 'ember/load-initializers';
+
+Ember.MODEL_FACTORY_INJECTIONS = true;
+
+var App = Ember.Application.extend({
+ modulePrefix: 'test-app', // TODO: loaded via config
+ Resolver: Resolver
+});
+
+loadInitializers(App, 'test-app');
+
+export default App;
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/components/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/app/components/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/controllers/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/app/controllers/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/helpers/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/app/helpers/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/index.html b/middleman-core/fixtures/ember-cli-app/test-app/app/index.html
new file mode 100644
index 00000000..407e7a81
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/app/index.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+ TestApp
+
+
+
+ {{BASE_TAG}}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/models/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/app/models/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/router.js b/middleman-core/fixtures/ember-cli-app/test-app/app/router.js
new file mode 100644
index 00000000..27e55fc1
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/app/router.js
@@ -0,0 +1,10 @@
+import Ember from 'ember';
+
+var Router = Ember.Router.extend({
+ location: TestAppENV.locationType
+});
+
+Router.map(function() {
+});
+
+export default Router;
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/routes/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/app/routes/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/styles/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/app/styles/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/styles/app.css b/middleman-core/fixtures/ember-cli-app/test-app/app/styles/app.css
new file mode 100644
index 00000000..9adb5ad0
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/app/styles/app.css
@@ -0,0 +1,3 @@
+html, body {
+ margin: 20px;
+}
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/templates/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/app/templates/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/templates/application.hbs b/middleman-core/fixtures/ember-cli-app/test-app/app/templates/application.hbs
new file mode 100644
index 00000000..d08c11f6
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/app/templates/application.hbs
@@ -0,0 +1,3 @@
+Welcome to Ember.js
+
+{{outlet}}
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/templates/components/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/app/templates/components/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/app/views/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/app/views/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/bower.json b/middleman-core/fixtures/ember-cli-app/test-app/bower.json
new file mode 100644
index 00000000..2df9fbf7
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/bower.json
@@ -0,0 +1,16 @@
+{
+ "name": "test-app",
+ "dependencies": {
+ "handlebars": "~1.3.0",
+ "jquery": "^1.11.1",
+ "qunit": "~1.12.0",
+ "ember-qunit": "~0.1.5",
+ "ember": "1.5.1",
+ "ember-resolver": "~0.1.1",
+ "loader": "stefanpenner/loader.js#1.0.0",
+ "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.2",
+ "ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
+ "ember-qunit-notifications": "^0.0.3",
+ "ember-cli-test-loader": "rjackson/ember-cli-test-loader#0.0.2"
+ }
+}
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/config/environment.js b/middleman-core/fixtures/ember-cli-app/test-app/config/environment.js
new file mode 100644
index 00000000..6a0a47a4
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/config/environment.js
@@ -0,0 +1,38 @@
+/* jshint node: true */
+
+module.exports = function(environment) {
+ var ENV = {
+ environment: environment,
+ baseURL: '/',
+ locationType: 'auto',
+ EmberENV: {
+ FEATURES: {
+ // Here you can enable experimental features on an ember canary build
+ // e.g. 'with-controller': true
+ }
+ },
+
+ APP: {
+ // Here you can pass flags/options to your application instance
+ // when it is created
+ }
+ };
+
+ if (environment === 'development') {
+ // LOG_MODULE_RESOLVER is needed for pre-1.6.0
+ ENV.LOG_MODULE_RESOLVER = true;
+
+ ENV.APP.LOG_RESOLVER = true;
+ ENV.APP.LOG_ACTIVE_GENERATION = true;
+ ENV.APP.LOG_MODULE_RESOLVER = true;
+ // ENV.APP.LOG_TRANSITIONS = true;
+ // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
+ ENV.APP.LOG_VIEW_LOOKUPS = true;
+ }
+
+ if (environment === 'production') {
+
+ }
+
+ return ENV;
+};
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/package.json b/middleman-core/fixtures/ember-cli-app/test-app/package.json
new file mode 100644
index 00000000..e803ec1d
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "test-app",
+ "version": "0.0.0",
+ "private": true,
+ "directories": {
+ "doc": "doc",
+ "test": "test"
+ },
+ "scripts": {
+ "start": "ember server",
+ "build": "ember build",
+ "test": "ember test"
+ },
+ "repository": "https://github.com/stefanpenner/ember-cli",
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "author": "",
+ "license": "MIT",
+ "devDependencies": {
+ "ember-cli": "0.0.39",
+ "originate": "0.1.5",
+ "broccoli-ember-hbs-template-compiler": "^1.5.0",
+ "express": "^4.1.1",
+ "body-parser": "^1.2.0",
+ "glob": "^3.2.9",
+ "ember-cli-ic-ajax": "0.1.1",
+ "ember-cli-ember-data": "0.1.0",
+ "broccoli-asset-rev": "0.0.11"
+ }
+}
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/public/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/public/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/testem.json b/middleman-core/fixtures/ember-cli-app/test-app/testem.json
new file mode 100644
index 00000000..bbcd347c
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/testem.json
@@ -0,0 +1,6 @@
+{
+ "framework": "qunit",
+ "test_page": "tests/index.html",
+ "launch_in_ci": ["PhantomJS"],
+ "launch_in_dev": ["PhantomJS", "Chrome"]
+}
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/tests/.jshintrc b/middleman-core/fixtures/ember-cli-app/test-app/tests/.jshintrc
new file mode 100644
index 00000000..0afcbfb2
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/tests/.jshintrc
@@ -0,0 +1,73 @@
+{
+ "predef": [
+ "document",
+ "window",
+ "location",
+ "setTimeout",
+ "$",
+ "QUnit",
+ "define",
+ "console",
+ "equal",
+ "notEqual",
+ "notStrictEqual",
+ "test",
+ "asyncTest",
+ "testBoth",
+ "testWithDefault",
+ "raises",
+ "throws",
+ "deepEqual",
+ "start",
+ "stop",
+ "ok",
+ "strictEqual",
+ "module",
+ "moduleFor",
+ "moduleForComponent",
+ "moduleForModel",
+ "process",
+ "expect",
+ "visit",
+ "exists",
+ "fillIn",
+ "click",
+ "keyEvent",
+ "find",
+ "findWithAssert",
+ "wait",
+ "DS",
+ "keyEvent",
+ "isolatedContainer",
+ "startApp",
+ "andThen",
+ "currentURL",
+ "currentPath",
+ "currentRouteName"
+ ],
+ "node": false,
+ "browser": false,
+ "boss": true,
+ "curly": false,
+ "debug": false,
+ "devel": false,
+ "eqeqeq": true,
+ "evil": true,
+ "forin": false,
+ "immed": false,
+ "laxbreak": false,
+ "newcap": true,
+ "noarg": true,
+ "noempty": false,
+ "nonew": false,
+ "nomen": false,
+ "onevar": false,
+ "plusplus": false,
+ "regexp": false,
+ "undef": true,
+ "sub": true,
+ "strict": false,
+ "white": false,
+ "eqnull": true,
+ "esnext": true
+}
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/tests/helpers/resolver.js b/middleman-core/fixtures/ember-cli-app/test-app/tests/helpers/resolver.js
new file mode 100644
index 00000000..24ceae28
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/tests/helpers/resolver.js
@@ -0,0 +1,9 @@
+import Resolver from 'ember/resolver';
+
+var resolver = Resolver.create();
+
+resolver.namespace = {
+ modulePrefix: 'test-app'
+};
+
+export default resolver;
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/tests/helpers/start-app.js b/middleman-core/fixtures/ember-cli-app/test-app/tests/helpers/start-app.js
new file mode 100644
index 00000000..a60e7ff8
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/tests/helpers/start-app.js
@@ -0,0 +1,30 @@
+/* global require */
+
+var Application = require('test-app/app')['default'];
+var Router = require('test-app/router')['default'];
+import Ember from 'ember';
+
+export default function startApp(attrs) {
+ var App;
+
+ var attributes = Ember.merge({
+ // useful Test defaults
+ rootElement: '#ember-testing',
+ LOG_ACTIVE_GENERATION:false,
+ LOG_VIEW_LOOKUPS: false
+ }, attrs); // but you can override;
+
+ Router.reopen({
+ location: 'none'
+ });
+
+ Ember.run(function(){
+ App = Application.create(attributes);
+ App.setupForTesting();
+ App.injectTestHelpers();
+ });
+
+ App.reset(); // this shouldn't be needed, i want to be able to "start an app at a specific URL"
+
+ return App;
+}
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/tests/index.html b/middleman-core/fixtures/ember-cli-app/test-app/tests/index.html
new file mode 100644
index 00000000..695739f1
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/tests/index.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+ TestApp Tests
+
+
+
+ {{BASE_TAG}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/tests/test-helper.js b/middleman-core/fixtures/ember-cli-app/test-app/tests/test-helper.js
new file mode 100644
index 00000000..a182571c
--- /dev/null
+++ b/middleman-core/fixtures/ember-cli-app/test-app/tests/test-helper.js
@@ -0,0 +1,6 @@
+import resolver from './helpers/resolver';
+import { setResolver } from 'ember-qunit';
+
+setResolver(resolver);
+
+document.write('');
diff --git a/middleman-core/fixtures/ember-cli-app/test-app/tests/unit/.gitkeep b/middleman-core/fixtures/ember-cli-app/test-app/tests/unit/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/middleman-core/fixtures/multiple-data-sources-app/data/data.yml b/middleman-core/fixtures/multiple-data-sources-app/data/data.yml
index a87870c0..d434b4f3 100644
--- a/middleman-core/fixtures/multiple-data-sources-app/data/data.yml
+++ b/middleman-core/fixtures/multiple-data-sources-app/data/data.yml
@@ -1 +1 @@
-title: Data Default
\ No newline at end of file
+title: Data Default
diff --git a/middleman-core/fixtures/multiple-data-sources-app/data0/one.yml b/middleman-core/fixtures/multiple-data-sources-app/data0/one.yml
index 4998511c..69056765 100644
--- a/middleman-core/fixtures/multiple-data-sources-app/data0/one.yml
+++ b/middleman-core/fixtures/multiple-data-sources-app/data0/one.yml
@@ -1 +1 @@
-title: Opposite 2
\ No newline at end of file
+title: Opposite 2
diff --git a/middleman-core/fixtures/multiple-data-sources-app/data1/one.yml b/middleman-core/fixtures/multiple-data-sources-app/data1/one.yml
index ab75d10e..c1675a11 100644
--- a/middleman-core/fixtures/multiple-data-sources-app/data1/one.yml
+++ b/middleman-core/fixtures/multiple-data-sources-app/data1/one.yml
@@ -1 +1 @@
-title: Opposite 1
\ No newline at end of file
+title: Opposite 1
diff --git a/middleman-core/fixtures/multiple-data-sources-app/source/index.html.erb b/middleman-core/fixtures/multiple-data-sources-app/source/index.html.erb
index cf0e7a0f..98871082 100644
--- a/middleman-core/fixtures/multiple-data-sources-app/source/index.html.erb
+++ b/middleman-core/fixtures/multiple-data-sources-app/source/index.html.erb
@@ -1,5 +1,10 @@
Default: <%= data.data.title %>
Data 1: <%= data.data1.title %>
Data 2: <%= data.data2.title %>
+<<<<<<< HEAD
Override in Two: <%= data.two.title %>
-Override in One: <%= data.one.title %>
\ No newline at end of file
+Override in One: <%= data.one.title %>
+=======
+Override in One: <%= data.one.title %>
+Override in Two: <%= data.two.title %>
+>>>>>>> Add external command support
diff --git a/middleman-core/lib/middleman-core/config_context.rb b/middleman-core/lib/middleman-core/config_context.rb
index 5c5ee42f..b517f2bd 100644
--- a/middleman-core/lib/middleman-core/config_context.rb
+++ b/middleman-core/lib/middleman-core/config_context.rb
@@ -7,7 +7,7 @@ module Middleman
attr_reader :app
# Whitelist methods that can reach out.
- def_delegators :@app, :config, :logger, :use, :map, :mime_type, :data, :files, :root
+ def_delegators :@app, :config, :logger, :use, :map, :mime_type, :data, :files, :root, :build?, :server?, :environment?
def_delegator :"@app.extensions", :activate
def initialize(app, template_context_class)
diff --git a/middleman-core/lib/middleman-core/core_extensions.rb b/middleman-core/lib/middleman-core/core_extensions.rb
index 36fdb509..5f246d36 100644
--- a/middleman-core/lib/middleman-core/core_extensions.rb
+++ b/middleman-core/lib/middleman-core/core_extensions.rb
@@ -128,3 +128,8 @@ Middleman::Extensions.register :automatic_alt_tags do
require 'middleman-core/extensions/automatic_alt_tags'
Middleman::Extensions::AutomaticAltTags
end
+
+Middleman::Extensions.register :external_pipeline do
+ require 'middleman-core/extensions/external_pipeline'
+ Middleman::Extensions::ExternalPipeline
+end
diff --git a/middleman-core/lib/middleman-core/core_extensions/i18n.rb b/middleman-core/lib/middleman-core/core_extensions/i18n.rb
index 45459126..3b24552b 100644
--- a/middleman-core/lib/middleman-core/core_extensions/i18n.rb
+++ b/middleman-core/lib/middleman-core/core_extensions/i18n.rb
@@ -7,8 +7,6 @@ class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
option :mount_at_root, nil, 'Mount a specific language at the root of the site'
option :data, 'locales', 'The directory holding your locale configurations'
- def_delegator :@app, :logger
-
def after_configuration
# See https://github.com/svenfuchs/i18n/wiki/Fallbacks
unless options[:no_fallbacks]
diff --git a/middleman-core/lib/middleman-core/extension.rb b/middleman-core/lib/middleman-core/extension.rb
index d52a1fae..cc8eeb5c 100644
--- a/middleman-core/lib/middleman-core/extension.rb
+++ b/middleman-core/lib/middleman-core/extension.rb
@@ -67,6 +67,8 @@ module Middleman
extend Forwardable
include Contracts
+ def_delegator :@app, :logger
+
# @!attribute supports_multiple_instances
# @!scope class
# @return [Boolean] whether or not an extension can be activated multiple times, generating multiple instances of the extension.
diff --git a/middleman-core/lib/middleman-core/extensions/external_pipeline.rb b/middleman-core/lib/middleman-core/extensions/external_pipeline.rb
new file mode 100644
index 00000000..bcbcaf2b
--- /dev/null
+++ b/middleman-core/lib/middleman-core/extensions/external_pipeline.rb
@@ -0,0 +1,49 @@
+class Middleman::Extensions::ExternalPipeline < ::Middleman::Extension
+ self.supports_multiple_instances = true
+
+ option :name, nil, 'The name of the pipeline'
+ option :command, nil, 'The command to initialize'
+ option :source, nil, 'Path to merge into sitemap'
+ option :latency, 0.25, 'Latency between refreshes of source'
+
+ def initialize(app, config={}, &block)
+ super
+
+ if options[:name].nil?
+ throw "Name is required"
+ end
+
+ if options[:command].nil?
+ throw "Command is required"
+ end
+
+ if options[:source].nil?
+ throw "Source is required"
+ end
+
+ require 'thread'
+
+ app.files.watch :source,
+ path: File.expand_path(options[:source], app.root),
+ latency: options[:latency]
+ end
+
+ def after_configuration
+ if app.build?
+ logger.info "== Executing: `#{options[:command]}`"
+ watch_command!
+ else
+ logger.debug "== Executing: `#{options[:command]}`"
+ ::Thread.new { watch_command! }
+ end
+ end
+
+ def watch_command!
+ ::IO.popen(options[:command], 'r') do |pipe|
+ while buf = pipe.gets
+ without_newline = buf.sub(/\n$/,'')
+ logger.info "== External: #{without_newline}" if without_newline.length > 0
+ end
+ end
+ end
+end
diff --git a/middleman-core/lib/middleman-core/template_renderer.rb b/middleman-core/lib/middleman-core/template_renderer.rb
index 050ee207..dc7e1a77 100644
--- a/middleman-core/lib/middleman-core/template_renderer.rb
+++ b/middleman-core/lib/middleman-core/template_renderer.rb
@@ -176,7 +176,7 @@ module Middleman
end
end
- Contract IsA['Middleman::Application'], Or[Symbol, String], Hash => Maybe[IsA['Middleman::SourceFile']]
+ Contract IsA['Middleman::Application'], String, Hash => Maybe[IsA['Middleman::SourceFile']]
def self.uncached_resolve_template(app, relative_path, options)
# By default, any engine will do
preferred_engines = []