Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba815a3
commit 72e9bec
Showing
4 changed files
with
531 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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']); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"require-dev": { | ||
"phpunit/phpunit": "3.7.*" | ||
} | ||
} |
Oops, something went wrong.