<commit_before>module.exports = function(grunt) {
	grunt.loadNpmTasks('grunt-contrib-clean');
	grunt.loadNpmTasks('grunt-contrib-copy');
	grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-handlebars');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-requirejs');


	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		clean: {
			cruft: ['**/.DS_Store','**/Thumbs.db'],
      bin: ['bin/*'],
      postoptimize: ['bin/optimized/*.html','!bin/optimized/demo_requirejs.html'],
      nonminifiedVendorJS: {expand: true, cwd:'bin', src: ['**/vendor/**/*.js','!**/vendor/**/*.min.js']}
		},

    copy: {
      js: { files: [ {expand: true, cwd: 'src/', src: ['js/**/*.js'], dest: 'bin/'} ] },
      component_library: { files: [ {expand: true, cwd: 'src/', src: ['component_library/**/*.js'], dest: 'bin/'} ] },
      html: { files: [ {expand: true, cwd: 'src/', src: ['*.html'], dest: 'bin/' } ] }
    },

    less: {
      main: {
        files: {'bin/css/main.css':'src/less/main.less'}
      }
    },

    handlebars: {
      options: {
        namespace: false,
        amd: true
      },
      files: {
        expand: true,
        cwd: 'src/component_library/ui',
        src: ['*.hbs'],
        flatten: true,
        extDot: 'last',
        ext: '.hbs.js',
        dest: 'bin/component_library/ui'
      }
    },

    watch: {
      static_assets: {
        files: ['bin/**/*'],
        options: {
          debounceDelay: 1000,
          livereload: 9000
        },
      },
      html: {
        files: ['src/*.html'],
        tasks: ['copy:html']
      },
      js: {
        files: ['src/**/*.js'],
        tasks: ['copy:js']
      },
      handlebars: {
        files: ['src/component_library/ui/*.hbs'],
        tasks: ['handlebars']
      }
    },

    requirejs: {
      optimized: {
        options: {
          appDir: 'bin/',
          dir: 'bin/optimized',
          mainConfigFile: 'bin/js/main.js',
          removeCombined: true,
          optimize: 'none',
          optimize: 'uglify2',
          uglify2: {<commit_msg>Fix components not updating on save<commit_after>module.exports = function(grunt) {
	grunt.loadNpmTasks('grunt-contrib-clean');
	grunt.loadNpmTasks('grunt-contrib-copy');
	grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-handlebars');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-requirejs');


	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		clean: {
			cruft: ['**/.DS_Store','**/Thumbs.db'],
      bin: ['bin/*'],
      postoptimize: ['bin/optimized/*.html','!bin/optimized/demo_requirejs.html'],
      nonminifiedVendorJS: {expand: true, cwd:'bin', src: ['**/vendor/**/*.js','!**/vendor/**/*.min.js']}
		},

    copy: {
      js: { files: [ {expand: true, cwd: 'src/', src: ['js/**/*.js'], dest: 'bin/'} ] },
      component_library: { files: [ {expand: true, cwd: 'src/', src: ['component_library/**/*.js'], dest: 'bin/'} ] },
      html: { files: [ {expand: true, cwd: 'src/', src: ['*.html'], dest: 'bin/' } ] }
    },

    less: {
      main: {
        files: {'bin/css/main.css':'src/less/main.less'}
      }
    },

    handlebars: {
      options: {
        namespace: false,
        amd: true
      },
      files: {
        expand: true,
        cwd: 'src/component_library/ui',
        src: ['*.hbs'],
        flatten: true,
        extDot: 'last',
        ext: '.hbs.js',
        dest: 'bin/component_library/ui'
      }
    },

    watch: {
      static_assets: {
        files: ['bin/**/*'],
        options: {
          debounceDelay: 1000,
          livereload: 9000
        },
      },
      html: {
        files: ['src/*.html'],
        tasks: ['copy:html']
      },
      js: {
        files: ['src/**/*.js'],
        tasks: ['copy:js','copy:component_library']
      },
      handlebars: {
        files: ['src/component_library/ui/*.hbs'],
        tasks: ['handlebars']
      }
    },

    requirejs: {
      optimized: {
        options: {
          appDir: 'bin/',
          dir: 'bin/optimized',
          mainConfigFile: 'bin/js/main.js',
          removeCombined: true,
          optimize: 'none',
          optimize: 'uglify2',
          uglify2: {
{'fraction_non_alphanumeric': 0.204348842646715, 'fraction_numerical': 0.004676174888940846, 'mean_word_length': 2.1, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2165391', 'n_tokens_mistral': 1524, 'n_tokens_neox': 1483, 'n_words': 245}