Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edouard-lopez/6397228 to your computer and use it in GitHub Desktop.
Save edouard-lopez/6397228 to your computer and use it in GitHub Desktop.
Use PHP with your Yeoman dev server, config to run on `/` directory instead of `app/` (legacy project). More info see: http://coderwall.com/p/bal2_a
From 24c4a289dff902de91ac22e0d7d9d6c50331a22d Mon Sep 17 00:00:00 2001
From: Edouard Lopez <dev+git@edouard-lopez.com>
Date: Sat, 31 Aug 2013 11:25:14 +0200
Subject: [PATCH] chore(yeoman): add PHP server capabitilies
Following: https://coderwall.com/p/bal2_a
---
Gruntfile.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Gruntfile.js b/Gruntfile.js
index 11ddda8..effe0d8 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -12,6 +12,7 @@ var mountFolder = function (connect, dir) {
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
+var gateway = require('gateway');
module.exports = function (grunt) {
// show elapsed time at the end
require('time-grunt')(grunt);
@@ -66,6 +67,10 @@ module.exports = function (grunt) {
middleware: function (connect) {
return [
lrSnippet,
+ gateway(__dirname + '/', {
+ '.php': 'php-cgi'
+ }),
+ mountFolder(connect, __dirname),
mountFolder(connect, '.tmp'),
mountFolder(connect, yeomanConfig.app)
];
--
1.7.10.4
@andyshora
Copy link

This solved all my grunt problems, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment