text: 'use strict';
  
  module.exports = function (grunt) {
  
    var gruntConfig = require('./gruntconfig');
  
    gruntConfig.tasks.forEach(grunt.loadNpmTasks);
    grunt.initConfig(gruntConfig);
  
    grunt.event.on('watch', function (action, filepath) {
      // Only lint the file that actually changed
      grunt.config(['eslint', 'scripts'], filepath);
    });
  
    grunt.registerTask('test', [
      'build'//,
      //'connect:test',
      //'mocha_phantomjs'
    ]);
  
    grunt.registerTask('build', [
      'clean:build',
      'eslint:scripts',
      //'eslint:tests',
      'browserify',
      'copy:leaflet',
      'copy:leaflet_fullscreen',
      'postcss:build',
      'copy:build'//,
      //'copy:test'
    ]);
  
    grunt.registerTask('builddist', [
      'build',
      'clean:dist',
      'copy:dist',
      'postcss:dist',
      'uglify'
    ]);
  
    grunt.registerTask('rundist', [
      'configureRewriteRules',
      'configureProxies:dist',
      'connect:template',
      'connect:dist'
    ]);
  
    grunt.registerTask('dist', [
      'builddist',
      'rundist'
    ]);
  
    grunt.registerTask('default', [
      'build',
      'configureRewriteRules',
      'configureProxies:dev',
      //'configureProxies:test',
      'connect:template',
      'connect:dev',
      //'connect:test',
      //'connect:example',
      //'mocha_phantomjs',
      'watch'
    ]);
  
  };
  