-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1610 from semperfiwebdesign/development
Development to master for 2.4.6
- Loading branch information
Showing
53 changed files
with
7,744 additions
and
7,268 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,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'] ); | ||
|
||
}; |
Oops, something went wrong.