/* This file has been generated by ox-ui-module generator.
 * Please only apply minor changes (better no changes at all) to this file
 * if you want to be able to run the generator again without much trouble.
 *
 * If you really have to change this file for whatever reason, try to contact
 * the core team and describe your use-case. May be, your changes can be
 * integrated into the templates to be of use for everybody.
 */
'use strict';

module.exports = function (grunt) {

    grunt.config.extend('watch', {

        options: {
            interval: 500,
            interrupt: true,
            debounceDelay: 500
        },
        manifests: {
            files: 'apps/**/manifest.json',
            tasks: ['manifests', 'force_update'],
            options: { livereload: true }
        },
        karma: {
            files: ['spec/**/*.js'],
            tasks: ['newer:jshint:specs', 'newer:copy:specs', 'karma:unit:run']
        },
        configs: {
            options: { reload: true },
            files: [
                'Gruntfile.js',
                'grunt/tasks/*.js'
            ],
            tasks: ['default']
        },
        all: {
            files: [
                'apps/**/*.{js,less}',
                'src/*',
                'lib/**/*.js',
                'bower.json',
                'package.json'
            ],
            tasks: ['default', 'karma:unit:run'],
            options: { livereload: true }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-watch');
};

@@ -469,24 +469,463 @@
  (grunt) %7B%0A%0A
+    var livereloadConfig = (function () %7B%0A        var conf = grunt.config().local.appserver;%0A        if (conf && conf.protocol === 'https') %7B%0A            return %7B%0A                key: grunt.file.read('node_modules/grunt-contrib-connect/tasks/certs/server.key'),%0A                cert: grunt.file.read('node_modules/grunt-contrib-connect/tasks/certs/server.crt')%0A            %7D;%0A        %7D else %7B%0A            return true;%0A        %7D%0A    %7D());%0A%0A
     grunt.co
@@ -947,16 +947,16 @@
 tch', %7B%0A
-
 %0A       
@@ -1207,36 +1207,48 @@
 : %7B livereload: 
-true
+livereloadConfig
  %7D%0A        %7D,%0A  
@@ -1885,20 +1885,32 @@
 reload: 
-true
+livereloadConfig
  %7D%0A     

fix livereload with new https setting