From 1fe2ec1a95a34519afec68f9beb0c43d2f2f4ae2 Mon Sep 17 00:00:00 2001 From: Jasmine Hegman Date: Wed, 17 Sep 2014 13:56:15 -0700 Subject: [PATCH] Adding grunt support and a default task that runs PHPUnit tests --- .gitignore | 1 + Gruntfile.js | 26 ++++++++++++++++++++++++++ package.json | 7 +++++++ 3 files changed, 34 insertions(+) create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 957b255..261aadb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ composer.phar vendor/ +node_modules/ \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..a6bc334 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,26 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + phpunit: { + classes: { + dir: 'tests/' + }, + options: { + bin: 'vendor/bin/phpunit', + colors: true, + followOutput: true + } + } + }); + + grunt.loadNpmTasks('grunt-phpunit'); + + // Default task(s). + grunt.registerTask('default', ['test']); + + // Default task(s). + grunt.registerTask('test', ['phpunit']); + +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..5dc137a --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "name": "php-druid-query", + "devDependencies": { + "grunt": "^0.4.5", + "grunt-phpunit": "^0.3.5" + } +}