custom-gruntfile.js 454 B

1234567891011121314151617181920
  1. module.exports = function(grunt) {
  2. // Project configuration.
  3. var path = require('path');
  4. var test = {};
  5. grunt.file.expand('*.json').forEach(function(filepath) {
  6. test[path.basename(filepath, '.json')] = grunt.file.readJSON(filepath);
  7. });
  8. grunt.initConfig({
  9. test: test
  10. });
  11. grunt.registerMultiTask('test', function() {
  12. this.files.forEach(function(f) {
  13. console.log('%s -> %s', f.src.join(' '), f.dest);
  14. });
  15. });
  16. };