<commit_before>/* jshint camelcase:false */
module.exports = function (grunt) {
  // Loading all tasks:
  require('load-grunt-tasks')(grunt);

  var pkg = require('./package'),
      klei = require('./klei'),
      modulename = klei.name || pkg.title || pkg.name;

  grunt.initConfig({
    pkg: pkg,
    modulename: modulename,

    /**
     * Source dirs
     */
    dirs: {
      src: 'src'<% if (angular) { %>,
      app: 'src/app'<% } %><% if (express) { %>,
      api: 'src/api'<% } %><% if (stylus) { %>,
      styles: 'src/styles'<% } %><% if (angular || stylus) { %>,
      dist: 'dist',
      temp: '.tmp'<% } %><% if (addconfig) { %>,
      config: 'src/config'<% } %>
    },

    <% if (angular || stylus) { %>
    /**
     * Banner for top of concatenated CSS and Javascript
     */
    meta: {
      banner: '/**\n' +
        ' * <%%= modulename %> - v<%%= pkg.version %> - <%%= grunt.template.today("yyyy-mm-dd") %>\n' +
        ' *\n' +
        ' * Copyright (c) <%%= grunt.template.today("yyyy") %> <%%= pkg.author %>\n' +
        ' */\n'
    },

    /**
     * Clean up
     */
    clean: {
      dist: {
        files: [{
          src: [
            '<%%= dirs.temp %>',
            '<%%= dirs.dist %>'
          ]
        }]
      },
      temp: '<%%= dirs.temp %>'
    },<% } %>

    /**
     * Server
     */
    <% if (express) { %>'express'<% } else { %>'connect'<% } %>: {
      options: {
        port: 1337,
        open: false,
        livereload: false,
        // change this to '0.0.0.0' to access the server from outside
        hostname: '*'
      },
      livereload: {
        options: {
          livereload: 35729<% if (express) { %>,
          serverreload: true,
          showStack: true,
          server: '<%%= dirs.src %>/index.js'<% } else { %>,
          open: true<% } %>,
          base<% if (express) { %>s<% } %>: [
            'bower_components',
            '<%%= dirs.temp %>',
            '<%%= dirs.app %>',
            '<%%= dirs.dist %>'
          ]
        }
      },
      dist: {
        options: {<% if (express) { %>
          open: true,
          server: '<%%= dirs.src %>/index.js',<% } %>
          bases: [
            'bower_components',
            '<%%= dirs.dist %>'
          ]
        }
      }
    },

    /**
     * Watch files and do stuff
     */
    watch: {<% if (addconfig || express || !choseType) { %>
      base: {
        files: [<% if (express) { %>'<%%= dirs.api %>/**/*.js'<% } %><% if (!choseType) { %>, '<%%= dirs.src %>/**/*.js'<% } %><% if (addconfig) { %>, '<%%= dirs.config %>/*.js', '<%%= dirs.config %>/*.json'<% } %>],
        tasks: ['newer:jshint:base'<% if (express) { %>, 'newer:jshint:api'<% } %>]
      },<% } %><% if (stylus) { %>
      styles: {
        files: ['<%%= dirs.styles %>/**/*.styl'<% if (angular) { %>, '<%%= dirs.app %>/**/*.styl'<% } %>],
        tasks: ['newer:stylus', 'newer:csslint', 'injector:app', 'injector:styleguide']
      },
      styleguide: {
        files: ['<%%= dirs.styles %>/styleguide.html'],<commit_msg>Cleaning temp css dir when style-files are deleted<commit_after>/* jshint camelcase:false */
module.exports = function (grunt) {
  // Loading all tasks:
  require('load-grunt-tasks')(grunt);

  var pkg = require('./package'),
      klei = require('./klei'),
      modulename = klei.name || pkg.title || pkg.name;

  grunt.initConfig({
    pkg: pkg,
    modulename: modulename,

    /**
     * Source dirs
     */
    dirs: {
      src: 'src'<% if (angular) { %>,
      app: 'src/app'<% } %><% if (express) { %>,
      api: 'src/api'<% } %><% if (stylus) { %>,
      styles: 'src/styles'<% } %><% if (angular || stylus) { %>,
      dist: 'dist',
      temp: '.tmp'<% } %><% if (addconfig) { %>,
      config: 'src/config'<% } %>
    },

    <% if (angular || stylus) { %>
    /**
     * Banner for top of concatenated CSS and Javascript
     */
    meta: {
      banner: '/**\n' +
        ' * <%%= modulename %> - v<%%= pkg.version %> - <%%= grunt.template.today("yyyy-mm-dd") %>\n' +
        ' *\n' +
        ' * Copyright (c) <%%= grunt.template.today("yyyy") %> <%%= pkg.author %>\n' +
        ' */\n'
    },

    /**
     * Clean up
     */
    clean: {
      dist: {
        files: [{
          src: [
            '<%%= dirs.temp %>',
            '<%%= dirs.dist %>'
          ]
        }]
      },
      temp: '<%%= dirs.temp %>',
      temp_css: '<%%= dirs.temp %>/css'
    },<% } %>

    /**
     * Server
     */
    <% if (express) { %>'express'<% } else { %>'connect'<% } %>: {
      options: {
        port: 1337,
        open: false,
        livereload: false,
        // change this to '0.0.0.0' to access the server from outside
        hostname: '*'
      },
      livereload: {
        options: {
          livereload: 35729<% if (express) { %>,
          serverreload: true,
          showStack: true,
          server: '<%%= dirs.src %>/index.js'<% } else { %>,
          open: true<% } %>,
          base<% if (express) { %>s<% } %>: [
            'bower_components',
            '<%%= dirs.temp %>',
            '<%%= dirs.app %>',
            '<%%= dirs.dist %>'
          ]
        }
      },
      dist: {
        options: {<% if (express) { %>
          open: true,
          server: '<%%= dirs.src %>/index.js',<% } %>
          bases: [
            'bower_components',
            '<%%= dirs.dist %>'
          ]
        }
      }
    },

    /**
     * Watch files and do stuff
     */
    watch: {<% if (addconfig || express || !choseType) { %>
      base: {
        files: [<% if (express) { %>'<%%= dirs.api %>/**/*.js'<% } %><% if (!choseType) { %>, '<%%= dirs.src %>/**/*.js'<% } %><% if (addconfig) { %>, '<%%= dirs.config %>/*.js', '<%%= dirs.config %>/*.json'<% } %>],
        tasks: ['newer:jshint:base'<% if (express) { %>, 'newer:jshint:api'<% } %>]
      },<% } %><% if (stylus) { %>
      styles: {
        options: {
          event: ['added', 'changed']
        },
        files: ['<%%= dirs.styles %>/**/*.styl'<% if (angular) { %>, '<%%= dirs.app %>/**/*.styl'<% } %>],
        tasks: ['newer:stylus', 'newer:csslint', 'injector:app', 'injector:styleguide']
      },
      deleted_styles: {
        options: {
          event: 'deleted'
        },
        files: ['<%%= dirs.styles %>/**/*.styl'<% if (angular) { %>, '<%%= dirs.app %>/**/*.styl'<% } %>],
        tasks: ['clean:temp_css', 'stylus', 'csslint', 'injector:app', 'injector:styleguide']
      },
      styleguide: {
        files: ['<%%= dirs.styles %>/styleguide.html'],
{'fraction_non_alphanumeric': 0.2465858523860672, 'fraction_numerical': 0.003989565751112475, 'mean_word_length': 1.7203672787979967, 'pattern_counts': {'":': 0, '<': 120, '<?xml version=': 0, '>': 120, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6171400', 'n_tokens_mistral': 2487, 'n_tokens_neox': 2330, 'n_words': 426}