{"size": 2541, "ext": "js", "max_stars_repo_path": "build/gruntfile.js", "max_stars_repo_name": "victorhurdugaci/gallant", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "build/gruntfile.js", "max_issues_repo_name": "victorhurdugaci/gallant", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "build/gruntfile.js", "max_forks_repo_name": "victorhurdugaci/gallant", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.9285714286, "max_line_length": 85, "alphanum_fraction": 0.3892168438}
module.exports = function (grunt) {   
    require('jit-grunt')(grunt);
    
    var extFolder = 'ext/';
    var srcFolder = 'src/';
    var cssFolder = srcFolder + 'css/';
    var jsFolder = srcFolder + 'js/';
    var lessFolder = srcFolder + 'less/';
    var tsFolder = srcFolder + 'ts/';
    var bowerFolder = 'bower_components/';
    
    grunt.file.setBase('..');
 
    grunt.loadNpmTasks('grunt-bower-task');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-git');
    grunt.loadNpmTasks('grunt-typescript');
    
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        
        copy: {
            bootstrap: {
                expand: true, 
                cwd: bowerFolder + 'bootstrap/dist',
                src: '**/*',
                dest: srcFolder
            },
            jquery: {
                expand: true, 
                cwd: bowerFolder + 'jquery/dist',
                src: '**/*',
                dest: jsFolder
            }
        },
        
        gitclone: {
            definitelytyped: {
                options: {
                    repository: 'https://github.com/borisyankov/DefinitelyTyped.git',
                    directory: extFolder + 'definitelytyped'
                }
            }
        },
        
        bower: {
            install: {
            }
        },
        
        typescript: {
            source: {
                src: tsFolder + '**/*.ts',
                dest: jsFolder,
                options: {
                    declaration: false,
                }
            }   
        },
       
        less: {
            development: {
                options: {
                    compress: false,
                    yuicompress: false,
                    optimization: 2
                },
                files: {
                    'src/css/gallant.css': lessFolder + '/gallant.less'
                }
            }
        },
        
        watch: {
            styles: {
                files: [
                    lessFolder + '**/*.less',
                    tsFolder + '**/*.ts'
                ],
                tasks: ['default'],
                options: {
                    nospawn: true
                }
            }
        }
    });
    
    grunt.registerTask('init', [
        'gitclone:definitelytyped', 
        'bower', 
        'copy:bootstrap', 
        'copy:jquery',
        'default']);
        
    grunt.registerTask('default', [
        'less', 
        'typescript']);
}    