Skip to content

Instantly share code, notes, and snippets.

@trey
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trey/b5385f3b97c7fe0999f4 to your computer and use it in GitHub Desktop.
Save trey/b5385f3b97c7fe0999f4 to your computer and use it in GitHub Desktop.
Quickly Look at a static PHP site using Grunt instead of Apache

Quickly Look at a static PHP site using Grunt instead of Apache

Installation

  • Add these files to the root of your project.
  • Run grunt from the command line.

This is made possible with the magic of grunt-php.

module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
php: {
options: {
keepalive: true
},
watch: {}
}
});
// Actually running things.
grunt.loadNpmTasks('grunt-php');
// Default task(s).
grunt.registerTask('default', ['php']);
};
{
"name": "Example",
"version": "0.0.0",
"description": "Dunno",
"repository": {
"type": "git"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-php": "^1.1.1"
}
}
@trey
Copy link
Author

trey commented Jul 18, 2015

This is a Solutions Log post.

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