Created
August 31, 2013 09:40
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This solved all my grunt problems, thanks!