/* jshint camelcase:false */
module.exports = function(grunt) {
    var bumpFiles = [
        'package.json',
        'bower.json'
    ];

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        jasmine: {
            main: {
                src: [],
                options: {
                    vendor: [
                        'widgets/tests/SetUpTests.js',
                        'bower_components/dojo/dojo.js',
                        'widgets/tests/jasmineAMDErrorChecking.js'
                    ],
                    specs: [
                        'widgets/tests/spec/*.js',
                        'modules/tests/spec/*.js'
                    ],
                    host: 'http://localhost:8000'
                }
            }
        },
        jshint: {
            files: [
                'widgets/**/*.js',
                'modules/**/*.js',
                'resources/**/*.js',
                'Gruntfile.js',
                'agrc.profile.js'
            ],
            options: {
                jshintrc: '.jshintrc',
                ignores: [
                    'bower_components/**',
                    'resources/libs/**'
                ]
            }
        },
        watch: {
            files: [
                '**',
                '!_SpecRunner.html',
                '!**/node_modules/**',
                '!**/bower_components/**',
                '!**/vendor/**'
            ],
            tasks: [
                'jasmine:main:build',
                'amdcheck',
                'jshint'
            ],
            options: {
                livereload: true
            }
        },
        connect: {
            uses_defaults: {}
        },
        bump: {
            options: {
                files: bumpFiles,
                commitFiles: bumpFiles,
                pushTo: 'origin'
            }
        },
        amdcheck: {
            dev: {
                options: {
                    removeUnusedDependencies: false
                },
                files: [{
                    src: [
                        'widgets/**/*.js',
                        'modules/**/*.js'
                    ]
                }]
            }
        },
        esri_slurp: {
            options: {
                version: '3.11'
            },
            dev: {
                options: {
                    beautify: true
                },
                dest: 'vendor/esri'
            },
            travis: {
                dest: 'vendor/esri'
            }
        }
    });

    // Register tasks.
    for (var key in grunt.file.readJSON('package.json').devDependencies) {
        if (key !== 'grunt' && key.indexOf('grunt') === 0) {
            grunt.loadNpmTasks(key);
        }
    }

    // Default task.
    grunt.registerTask('default', [
        'if-missing:esri_slurp:dev',
        'amdcheck',
        'jshint',
        'connect',
        'jasmine:main:build',
        'watch'
    ]);

    grunt.registerTask('travis', [
        'esri_slurp:travis',
        'jshint',
        'connect',
        'jasmine:main'
    ]);
};
@@ -205,16 +205,914 @@
 json'),%0A
+        amdcheck: %7B%0A            dev: %7B%0A                options: %7B%0A                    removeUnusedDependencies: false%0A                %7D,%0A                files: %5B%7B%0A                    src: %5B%0A                        'widgets/**/*.js',%0A                        'modules/**/*.js'%0A                    %5D%0A                %7D%5D%0A            %7D%0A        %7D,%0A        bump: %7B%0A            options: %7B%0A                files: bumpFiles,%0A                commitFiles: bumpFiles,%0A                pushTo: 'origin'%0A            %7D%0A        %7D,%0A        connect: %7B%0A            uses_defaults: %7B%7D%0A        %7D,%0A        esri_slurp: %7B%0A            options: %7B%0A                version: '3.11'%0A            %7D,%0A            dev: %7B%0A                options: %7B%0A                    beautify: true%0A                %7D,%0A                dest: 'vendor/esri'%0A            %7D,%0A            travis: %7B%0A                dest: 'vendor/esri'%0A            %7D%0A        %7D,%0A
         
@@ -2541,906 +2541,8 @@
   %7D%0A
-        %7D,%0A        connect: %7B%0A            uses_defaults: %7B%7D%0A        %7D,%0A        bump: %7B%0A            options: %7B%0A                files: bumpFiles,%0A                commitFiles: bumpFiles,%0A                pushTo: 'origin'%0A            %7D%0A        %7D,%0A        amdcheck: %7B%0A            dev: %7B%0A                options: %7B%0A                    removeUnusedDependencies: false%0A                %7D,%0A                files: %5B%7B%0A                    src: %5B%0A                        'widgets/**/*.js',%0A                        'modules/**/*.js'%0A                    %5D%0A                %7D%5D%0A            %7D%0A        %7D,%0A        esri_slurp: %7B%0A            options: %7B%0A                version: '3.11'%0A            %7D,%0A            dev: %7B%0A                options: %7B%0A                    beautify: true%0A                %7D,%0A                dest: 'vendor/esri'%0A            %7D,%0A            travis: %7B%0A                dest: 'vendor/esri'%0A            %7D%0A
     

alphabetize tasks