Skip to content

Commit

Permalink
Add composer + grunt
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenharris committed Nov 5, 2013
1 parent ba815a3 commit 72e9bec
Show file tree
Hide file tree
Showing 4 changed files with 531 additions and 0 deletions.
65 changes: 65 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,65 @@
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
compress: {
global_defs: {
"WP_MARKDOWN_SCRIPT_DEBUG": false
},
dead_code: true
},
banner: '/*! <%= pkg.name %> <%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd HH:MM") %> */\n'
},
build: {
files: {
'js/frontend.min.js': ['js/frontend.js'],
'js/fullcalendar.min.js': ['js/fullcalendar.js'],
}
}
},
jshint: {
options: {
globals: {
"WP_MARKDOWN_SCRIPT_DEBUG": false,
},
'-W020': true, //Read only - error when assigning WP_MARKDOWN_SCRIPT_DEBUG a value.
},
all: [ 'js/*.js', '!js/*.min.js' ]
},
wp_readme_to_markdown: {
convert:{
files: {
'readme.md': 'readme.txt'
},
},
},
phpunit: {
classes: {
dir: 'tests/php/'
},
options: {
bin: 'vendor/bin/phpunit',
bootstrap: 'tests/php/phpunit.php',
colors: true
}
}
});



grunt.loadNpmTasks('grunt-contrib-uglify');

grunt.loadNpmTasks('grunt-contrib-jshint');

grunt.loadNpmTasks('grunt-wp-readme-to-markdown');

grunt.loadNpmTasks('grunt-phpunit');

// Default task(s).
grunt.registerTask('default', ['uglify']);

grunt.registerTask('readme', ['wp_readme_to_markdown']);
};
5 changes: 5 additions & 0 deletions composer.json
@@ -0,0 +1,5 @@
{
"require-dev": {
"phpunit/phpunit": "3.7.*"
}
}

0 comments on commit 72e9bec

Please sign in to comment.