<commit_before>module.exports = (grunt) ->

  stylusStyles = [
    'bower_components/este-library/este/**/*.styl'
    'client/app/css/**/*.styl'
  ]

  coffeeScripts = [
    'bower_components/este-library/este/**/*.coffee'
    'client/app/js/**/*.coffee'
    'server/**/*.coffee'
  ]

  soyTemplates = [
    'bower_components/este-library/este/**/*.soy'
    'client/app/js/**/*.soy'
  ]

  clientDirs = [
    'bower_components/closure-library'
    'bower_components/closure-templates'
    'bower_components/este-library/este'
    'client/app/js'
  ]

  clientDepsPath =
    'client/deps.js'

  clientDepsPrefix =
    '../../../../'

  grunt.initConfig

    # build tasks

    clean:
      app:
        options:
          force: true
        src: [
          'bower_components/este-library/este/**/*.{js,css}'
          'client/**/build/**.*'
          'client/**/{js,css}/**/*.{js,css}'
          'server/**/*.js'
        ]

    stylus:
      options:
        'include css': true
        'compress': false
      all:
        files: [
          expand: true
          src: stylusStyles
          ext: '.css'
        ]
      app:
        files: [
          expand: true
          src: 'client/app/css/app.styl'
          ext: '.css'
        ]

    coffee:
      options:
        bare: true
      app:
        files: [
          expand: true
          src: coffeeScripts
          ext: '.js'
        ]

    coffee2closure:
      app:
        files: [
          expand: true
          src: coffeeScripts
          ext: '.js'
        ]

    esteTemplates:
      app:
        src: soyTemplates

    esteDeps:
      all:
        options:
          outputFile: clientDepsPath
          prefix: clientDepsPrefix
          root: clientDirs

    esteUnitTests:
      options:
        depsPath: clientDepsPath
        prefix: clientDepsPrefix
      app:
        src: [
          'bower_components/este-library/este/**/*_test.js'
          'client/**/*_test.js'
        ]

    # build --stage tasks

    cssmin:
      app:
        files:
          'client/app/build/app.css': 'client/app/css/app.css'

    esteBuilder:
      options:
        root: clientDirs
        depsPath: clientDepsPath

        # Enable faster compilation for Windows with Java 1.7+.
        # javaFlags: ['-XX:+TieredCompilation']
        compilerFlags: do ->
<commit_msg>use string templates in Gruntfile.coffee<commit_after>module.exports = (grunt) ->

  grunt.initConfig

    # build tasks

    clean:
      app:
        options:
          force: true
        src: [
          'bower_components/este-library/este/**/*.{js,css}'
          'client/**/build/**.*'
          'client/**/{js,css}/**/*.{js,css}'
          'server/**/*.js'
        ]

    stylus:
      options:
        'include css': true
        'compress': false
      all:
        files: [
          expand: true
          src: [
            'bower_components/este-library/este/**/*.styl'
            'client/app/css/**/*.styl'
          ]
          ext: '.css'
        ]
      app:
        files: [
          expand: true
          src: 'client/app/css/app.styl'
          ext: '.css'
        ]

    coffee:
      options:
        bare: true
      app:
        files: [
          expand: true
          src: [
            'bower_components/este-library/este/**/*.coffee'
            'client/app/js/**/*.coffee'
            'server/**/*.coffee'
          ]
          ext: '.js'
        ]

    coffee2closure:
      app:
        files: '<%= coffee.app.files %>'

    esteTemplates:
      app:
        src: [
          'bower_components/este-library/este/**/*.soy'
          'client/app/js/**/*.soy'
        ]

    esteDeps:
      all:
        options:
          outputFile: 'client/deps.js'
          prefix: '../../../../'
          root: [
            'bower_components/closure-library'
            'bower_components/closure-templates'
            'bower_components/este-library/este'
            'client/app/js'
          ]

    esteUnitTests:
      options:
        depsPath: '<%= esteDeps.all.options.outputFile %>'
        prefix: '<%= esteDeps.all.options.prefix %>'
      app:
        src: [
          'bower_components/este-library/este/**/*_test.js'
          'client/**/*_test.js'
        ]

    # build --stage tasks

    cssmin:
      app:
        files:
          'client/app/build/app.css': 'client/app/css/app.css'

    esteBuilder:
      options:
        root: '<%= esteDeps.all.options.root%>'
        depsPath: '<%= esteDeps.all.options.outputFile %>'

        # Enable faster compilation for Windows with Java 1.7+.
        # javaFlags: ['-XX:+TieredCompilation']
        compilerFlags: do ->

{'fraction_non_alphanumeric': 0.14658331536969174, 'fraction_numerical': 0.0012933821944384565, 'mean_word_length': 1.4408206207259338, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, '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': '605525', 'n_tokens_mistral': 1519, 'n_tokens_neox': 1477, 'n_words': 239}