2014-12-29 23:38:34 +00:00
|
|
|
/*jslint node: true */
|
|
|
|
module.exports = function (grunt) {
|
|
|
|
'use strict';
|
2015-04-12 22:53:05 +00:00
|
|
|
grunt.initConfig(
|
|
|
|
{
|
|
|
|
uglify: {
|
|
|
|
combine: {
|
|
|
|
files: {
|
|
|
|
'dist/main.js': ['js/cast.js']
|
|
|
|
}
|
2014-12-29 23:38:34 +00:00
|
|
|
}
|
|
|
|
},
|
2015-04-12 22:53:05 +00:00
|
|
|
cssmin: {
|
|
|
|
combine: {
|
|
|
|
files: {
|
|
|
|
'dist/main.css': ['css/*.css']
|
|
|
|
}
|
|
|
|
}
|
2015-04-12 22:52:37 +00:00
|
|
|
},
|
2015-04-12 22:53:05 +00:00
|
|
|
watch: {
|
|
|
|
scripts: {
|
|
|
|
files: ['js/*.js'],
|
|
|
|
tasks: ['uglify']
|
|
|
|
},
|
|
|
|
styles: {
|
|
|
|
files: ['css/*.css'],
|
|
|
|
tasks: ['cssmin']
|
|
|
|
}
|
2015-04-12 22:52:37 +00:00
|
|
|
},
|
2015-04-12 22:53:05 +00:00
|
|
|
phpcs: {
|
|
|
|
php: {
|
|
|
|
src: ['*.php']
|
|
|
|
},
|
2015-08-29 20:03:10 +00:00
|
|
|
tests: {
|
|
|
|
src: ['tests/*.php']
|
|
|
|
},
|
2015-04-12 22:53:05 +00:00
|
|
|
js: {
|
|
|
|
src: ['js/*.js']
|
|
|
|
},
|
|
|
|
Gruntfile: {
|
|
|
|
src: ['Gruntfile.js']
|
|
|
|
}
|
2015-08-29 20:03:10 +00:00
|
|
|
},
|
|
|
|
phpunit: {
|
|
|
|
classes: {
|
|
|
|
dir: 'tests/'
|
|
|
|
}
|
2015-04-12 22:52:37 +00:00
|
|
|
}
|
2014-12-29 23:38:34 +00:00
|
|
|
}
|
2015-04-12 22:53:05 +00:00
|
|
|
);
|
2014-12-29 23:38:34 +00:00
|
|
|
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
2015-04-12 22:52:37 +00:00
|
|
|
grunt.loadNpmTasks('grunt-phpcs');
|
2015-08-29 20:03:10 +00:00
|
|
|
grunt.loadNpmTasks('grunt-phpunit');
|
2014-12-29 23:38:34 +00:00
|
|
|
|
|
|
|
grunt.registerTask('default', ['uglify', 'cssmin']);
|
2015-04-12 22:52:37 +00:00
|
|
|
grunt.registerTask('lint', ['phpcs']);
|
2015-08-29 20:03:10 +00:00
|
|
|
grunt.registerTask('test', ['phpunit']);
|
2014-12-29 23:38:34 +00:00
|
|
|
};
|