Permalink
Browse files

Add composer + grunt

  • Loading branch information...
1 parent ba815a3 commit 72e9bec5303aed7208ba3907e94b46e4ea799fae @stephenharris committed Nov 5, 2013
Showing with 531 additions and 0 deletions.
  1. +65 −0 Gruntfile.js
  2. +5 −0 composer.json
  3. +439 −0 composer.lock
  4. +22 −0 package.json
View
@@ -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']);
+};
View
@@ -0,0 +1,5 @@
+{
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*"
+ }
+}
Oops, something went wrong.

0 comments on commit 72e9bec

Please sign in to comment.