/**
 * Grunt Build File
 */
module.exports = function(grunt) {

  var banner = '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
    '<%= grunt.template.today("yyyy-mm-dd") %> */\n';

  // Project configuration.
  grunt.initConfig({
    pkg: require('./package.json'),
    concat: {
      options: {
        banner: banner
      },
      normal: {
        src: ['<banner>', 'src/inline-attachment.js', 'src/input.inline-attachment.js'],
        dest: 'dist/inline-attachment.js'
      },
      jquery: {
        src: ['<banner>', 'src/inline-attachment.js', 'src/jquery.inline-attachment.js'],
        dest: 'dist/jquery.inline-attachment.js'
      },
      codemirror: {
        src: ['<banner>', 'src/inline-attachment.js', 'src/codemirror.inline-attachment.js'],
        dest: 'dist/codemirror.inline-attachment.js'
      },
      angularjs: {
        src: ['<banner>', 'src/inline-attachment.js', 'src/angularjs.inline-attachment.js'],
        dest: 'dist/angularjs.inline-attachment.js'
      }
    },
    // Lists of files to be minified with UglifyJS.
    uglify: {
      options: {
        banner: banner
      },
      normal: {
        src: ['<banner>', 'dist/inline-attachment.js'],
        dest: 'dist/inline-attachment.min.js',
        separator: ';'
      },
      jquery: {
        src: ['<banner>', 'dist/jquery.inline-attachment.js'],
        dest: 'dist/jquery.inline-attachment.min.js',
        separator: ';'
      },
      codemirror: {
        src: ['<banner>', 'dist/codemirror.inline-attachment.js'],
        dest: 'dist/codemirror.inline-attachment.min.js',
        separator: ';'
      },
      angularjs: {
        src: ['<banner>', 'dist/angularjs.inline-attachment.js'],
        dest: 'dist/angularjs.inline-attachment.min.js',
        separator: ';'
      }
    },
    jshint: {
      all: ['src/*.js'],
      options: {
        curly: true,
        eqeqeq: true,
        eqnull: true,
        browser: true,
        undef: true,
        unused: true,
        strict: true,
        trailing: true,
        indent: 2
      }
    },
    casperjs: {
      options: {
      },
      files: ['tests/*.js']
    }
  });

  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-casperjs');

  grunt.registerTask('qa', ['jshint']);
  grunt.registerTask('default', ['qa', 'concat', 'uglify']);
};
@@ -652,32 +652,33 @@
       codemirror
+3
 : %7B%0A        src:
@@ -726,32 +726,34 @@
  'src/codemirror
+-3
 .inline-attachme
@@ -783,32 +783,215 @@
 'dist/codemirror
+-3.inline-attachment.js'%0A      %7D,%0A      codemirror4: %7B%0A        src: %5B'%3Cbanner%3E', 'src/inline-attachment.js', 'src/codemirror-4.inline-attachment.js'%5D,%0A        dest: 'dist/codemirror-4
 .inline-attachme
@@ -1632,16 +1632,17 @@
 demirror
+3
 : %7B%0A    
@@ -1671,32 +1671,34 @@
 'dist/codemirror
+-3
 .inline-attachme
@@ -1736,16 +1736,200 @@
 demirror
+-3.inline-attachment.min.js',%0A        separator: ';'%0A      %7D,%0A      codemirror4: %7B%0A        src: %5B'%3Cbanner%3E', 'dist/codemirror-4.inline-attachment.js'%5D,%0A        dest: 'dist/codemirror-4
 .inline-

split codemirror 3 and 4 dist builds