Skip to content

Commit

Permalink
Merge pull request #1610 from semperfiwebdesign/development
Browse files Browse the repository at this point in the history
Development to master for 2.4.6
  • Loading branch information
michaeltorbert committed Mar 15, 2018
2 parents 581838b + d08a5fd commit 410ad40
Show file tree
Hide file tree
Showing 53 changed files with 7,744 additions and 7,268 deletions.
97 changes: 97 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig(
{
pkg: grunt.file.readJSON( 'package.json' ),
files_php: [
'*.php',
'**/*.php',
'!.git/**',
'!vendor/**',
'!node_modules/**',
'!logs/**'
],
files_js: [
'*.js',
'**/*.js',
'!*.min.js',
'!**/*.min.js',
'!.git/**',
'!vendor/**',
'!js/vendor/*.js',
'!public/js/vendor/*.js',
'!node_modules/**',
'!logs/**'
],
mkdir: {
logs: {
options: {
create: ['logs']
}
}
},
phpcs: {
options: {
standard: 'phpcs.xml',
reportFile: 'logs/phpcs.log',
extensions: 'php'
},
src: [
'<%= files_php %>'
]
},
phpcbf: {
options: {
standard: 'phpcs.xml',
},
src: [
'<%= files_php %>'
]
},
phplint: {
options: {
standard: 'phpcs.xml',
},
src: [
'<%= files_php %>'
]
},
jshint: {
options: {
jshintrc:true,
reporterOutput:'logs/jslogs.log'
},
all: [
'<%= files_js %>'
]
},
uglify: {
dev: {
files: [{
expand: true,
src: ['js/*.js', '!js/*.min.js', 'js/**/*.js', '!js/**/*.min.js'],
dest: ['.'],
cwd: '.',
rename: function (dst, src) {
// To keep the source js files and make new files as `*.min.js`:
return dst + '/' + src.replace( '.js', '.min.js' );
}
}]
}
}
}
);

// Load the plugins
grunt.loadNpmTasks( 'grunt-mkdir' );
grunt.loadNpmTasks( 'grunt-phpcbf' );
grunt.loadNpmTasks( 'grunt-phpcs' );
grunt.loadNpmTasks( 'grunt-phplint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );

// Default task(s).
grunt.registerTask( 'default', ['mkdir', 'phpcbf', 'phpcs', 'phplint', 'jshint', 'uglify'] );

};

0 comments on commit 410ad40

Please sign in to comment.