{"size": 1300, "ext": "js", "max_stars_repo_path": "Gruntfile.js", "max_stars_repo_name": "moiseshilario/tibia-node-crawler", "max_stars_repo_stars_event_min_datetime": "2015-07-24T08:49:32.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-06T01:22:38.000Z", "max_issues_repo_path": "Gruntfile.js", "max_issues_repo_name": "tibialand/tibia-crawler", "max_issues_repo_issues_event_min_datetime": "2015-07-21T12:24:49.000Z", "max_issues_repo_issues_event_max_datetime": "2017-11-16T10:49:55.000Z", "max_forks_repo_path": "Gruntfile.js", "max_forks_repo_name": "tibialand/tibia-crawler", "max_forks_repo_forks_event_min_datetime": "2016-06-21T12:04:34.000Z", "max_forks_repo_forks_event_max_datetime": "2019-08-05T14:49:49.000Z"}
{"max_stars_count": 15, "max_issues_count": 3, "max_forks_count": 8, "avg_line_length": 28.8888888889, "max_line_length": 108, "alphanum_fraction": 0.5246153846}
'use strict';
module.exports = function(grunt) {

  grunt.loadNpmTasks('grunt-replace');

  grunt.initConfig({
    replace: {
      module: {
        options: {
          patterns: [
            {match: 'Module', replacement: "<%= grunt.config.get('nameUpper') %>"},
            {match: 'module', replacement: "<%= grunt.config.get('nameLower') %>"},
            {match: 'ModuleParser', replacement: "<%= grunt.config.get('nameUpper') %>Parser"},
            {match: 'ModuleRequester', replacement: "<%= grunt.config.get('nameUpper') %>Requester"},
          ]
        },
        files: [
          {
            expand: true,
            flatten: true,
            src: ['.bp/module/*', '.bp/module/**/*'],
            dest: "src/modules/<%= grunt.config.get('nameLower') %>/"
          }
        ]
      }
    },
    'release-it': {
      options: {
        pkgFiles: ['package.json'],
        commitMessage: 'Release %s',
        tagName: '%s',
        tagAnnotation: 'Release %s',
        buildCommand: false
      }
    }
  });

  grunt.registerTask('create-module', function(name){
    grunt.config.set('nameLower', name.toLowerCase());
    grunt.config.set('nameUpper', name.toLowerCase().charAt(0).toUpperCase() + name.toLowerCase().slice(1));
    grunt.task.run('replace:module');
  });

};
