module.exports = function (grunt) {
	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		ngdocs: {
			options: {
				dest: 'docs',
				scripts: ['http://code.jquery.com/jquery-1.11.0.js',
                                'http://code.jquery.com/ui/1.10.4/jquery-ui.js',
                                'http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/js/bootstrap.min.js',
                                'angular.js',
                                'bower_components/angular-route/angular-route.js',
                                'http://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.js',
                                'http://cdnjs.cloudflare.com/ajax/libs/angular-ui-utils/0.1.1/angular-ui-utils.min.js',
                                'http://maps.google.com/maps/api/js?sensor=false&.js',
                                'http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js',
                                'dist/geo-web-toolkit-min.js'],
                                styles: ["http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css",
                                "http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"],
				html5Mode: false
			},
			api: {
				src: ['src/**/*.js', '!src/**/*.spec.js'],
				title: 'API Documentation'
			}
		},
        uglify: {
            options: {
                mangle: true,
                sourceMap: true,
                sourceMapName: 'dist/geo-web-toolkit-min.js.map',
                beautify: false
            },
            my_target: {
                files: {
                    'dist/geo-web-toolkit-min.js':
                        [
                            'src/main/js/config/*.js',
                            'src/main/js/core/*.js',
                            'src/main/js/vendor/*.js',
                            'src/main/js/map services/*.js',
                            'src/main/js/ui/**/*.js'
                        ]
                }
            }
        },
        ngtemplates:  {
            'gawebtoolkit.ui.templates': {
                src:      'src/main/js/ui/**/*.html',
                dest: 'src/main/js/toolkit-templates.js',
                options: {
                    standalone:true
                }
            }
        },
        concat: {
            options: {
                separator: '\r\n\r\n'
            },
            dist: {
                src: ['dist/geo-web-toolkit-min.js', 'src/main/js/toolkit-templates.js'],
                dest: 'dist/geo-web-toolkit-min.js'
            }
        },
        karma: {
            unit: {
                configFile: 'src/test/js/karma.conf.js',
                runnerPort: 9999,
                singleRun: true,
                browsers: ['PhantomJS'],
                logLevel: 'ERROR'
            }
        },
        bumpup: {
            files: ['package.json','bower.json']
        },
        tagrelease: {
            file: 'bower.json',
            commit:  true,
            message: 'Release %version%',
            prefix:  'v',
            annotate: false
        }
	});
    grunt.loadNpmTasks('grunt-karma');
	grunt.loadNpmTasks('grunt-ngdocs');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-angular-templates');
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-bumpup');
    grunt.loadNpmTasks('grunt-tagrelease');

	grunt.registerTask('default',['uglify','ngdocs','ngtemplates','concat']);
    grunt.registerTask('test',['default','karma']);

    grunt.registerTask('release', function (type) {
        type = type ? type : 'patch';
        grunt.task.run('uglify');         // Minify stuff
        grunt.task.run('ngdocs');         // Build doco
        grunt.task.run('ngtemplates');    // Build templates
        grunt.task.run('concat');         // Concat templates with min
        grunt.task.run('bumpup:' + type); // Bump up the package version
        grunt.task.run('tagrelease');     // Commit & tag the changes from above
    });
};
@@ -951,24 +951,114 @@
 Layers.js',%0A
+                                'https://cdnjs.cloudflare.com/ajax/libs/ol3/3.5.0/ol.js',%0A
             
@@ -1584,20 +1584,27 @@
 pName: '
-dist
+src/main/js
 /geo-web
@@ -1688,17 +1688,15 @@
     
-my_target
+release
 : %7B%0A
@@ -2110,32 +2110,499 @@
               %7D%0A
+            %7D,%0A            webjar: %7B%0A                files: %7B%0A                    'src/main/js/geo-web-toolkit-min.js':%0A                        %5B%0A                            'src/main/js/config/*.js',%0A                            'src/main/js/core/*.js',%0A                            'src/main/js/vendor/*.js',%0A                            'src/main/js/map services/*.js',%0A                            'src/main/js/ui/**/*.js'%0A                        %5D%0A                %7D%0A
             %7D%0A  

Create min files for webjar paths..