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

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

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

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

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

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

  clientDepsPath = 'client/deps.js'
  clientDepsPrefix = '../../../../'

  grunt.initConfig
    clean:
      app:
        options:
          force: true
        src: [
          'bower_components/este-library/**/*.js'
          '!bower_components/este-library/node_modules/**/*.js'
          'bower_components/este-library/**/*.css'
          'client/**/js/**/*.js'
          'client/**/css/**/*.css'
          'server/**/*.js'
        ]

    # same params as grunt-contrib-stylus
    esteStylus:
      options:
        'include css': true
        'compress': false
      app:
        files: [
          expand: true
          src: stylusStyles
          ext: '.css'
        ]

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

    # same params as grunt-contrib-coffee
    esteCoffee:
      options:
        bare: true
      app:
        files: [
          expand: true
          src: coffeeScripts
          ext: '.js'
        ]

    esteTemplates:
      options:
        soyToJsJarPath: 'bower_components/closure-templates/SoyToJsSrcCompiler.jar'
      app:
        src: soyTemplates

    esteDeps:
      all:
        options:
          depsWriterPath: 'bower_components/closure-library/closure/bin/build/depswriter.py'
          outputFile: clientDepsPath
          prefix: clientDepsPrefix
          root: clientDirs

    esteBuilder:
      options:
        closureBuilderPath: 'bower_components/closure-library/closure/bin/build/closurebuilder.py'
        compilerPath: 'bower_components/closure-compiler/compiler.jar'
        root: clientDirs
        # needs Java 1.7+, see http://goo.gl/iS3o6
        fastCompilation: false
        depsPath: clientDepsPath
        compilerFlags: if grunt.option('stage') == 'debug' then [
          '--output_wrapper="(function(){%output%})();"'
          '--compilation_level="ADVANCED_OPTIMIZATIONS"'
          '--warning_level="VERBOSE"'
          '--define=goog.DEBUG=true'
          '--debug=true'
          '--formatting="PRETTY_PRINT"'
        ]
        else [
          '--output_wrapper="(function(){%output%})();"'
          '--compilation_level="ADVANCED_OPTIMIZATIONS"'
          '--warning_level="VERBOSE"'
          '--define=goog.DEBUG=false'
        ]

      app:
        options:
          namespace: 'app.start'
          outputFilePath: 'client/app/build/app.js'

      appLocalized:
        options:
          namespace: 'app.start'<commit_msg>fastCompilation removed since it is default now<commit_after>module.exports = (grunt) ->

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

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

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

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

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

  clientDepsPath = 'client/deps.js'
  clientDepsPrefix = '../../../../'

  grunt.initConfig
    clean:
      app:
        options:
          force: true
        src: [
          'bower_components/este-library/**/*.js'
          '!bower_components/este-library/node_modules/**/*.js'
          'bower_components/este-library/**/*.css'
          'client/**/js/**/*.js'
          'client/**/css/**/*.css'
          'server/**/*.js'
        ]

    # same params as grunt-contrib-stylus
    esteStylus:
      options:
        'include css': true
        'compress': false
      app:
        files: [
          expand: true
          src: stylusStyles
          ext: '.css'
        ]

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

    # same params as grunt-contrib-coffee
    esteCoffee:
      options:
        bare: true
      app:
        files: [
          expand: true
          src: coffeeScripts
          ext: '.js'
        ]

    esteTemplates:
      options:
        soyToJsJarPath: 'bower_components/closure-templates/SoyToJsSrcCompiler.jar'
      app:
        src: soyTemplates

    esteDeps:
      all:
        options:
          depsWriterPath: 'bower_components/closure-library/closure/bin/build/depswriter.py'
          outputFile: clientDepsPath
          prefix: clientDepsPrefix
          root: clientDirs

    esteBuilder:
      options:
        closureBuilderPath: 'bower_components/closure-library/closure/bin/build/closurebuilder.py'
        compilerPath: 'bower_components/closure-compiler/compiler.jar'
        root: clientDirs
        depsPath: clientDepsPath
        compilerFlags: if grunt.option('stage') == 'debug' then [
          '--output_wrapper="(function(){%output%})();"'
          '--compilation_level="ADVANCED_OPTIMIZATIONS"'
          '--warning_level="VERBOSE"'
          '--define=goog.DEBUG=true'
          '--debug=true'
          '--formatting="PRETTY_PRINT"'
        ]
        else [
          '--output_wrapper="(function(){%output%})();"'
          '--compilation_level="ADVANCED_OPTIMIZATIONS"'
          '--warning_level="VERBOSE"'
          '--define=goog.DEBUG=false'
        ]

      app:
        options:
          namespace: 'app.start'
          outputFilePath: 'client/app/build/app.js'

      appLocalized:
        options:
          namespace: 'app.start'
{'fraction_non_alphanumeric': 0.14615384615384616, 'fraction_numerical': 0.000641025641025641, 'mean_word_length': 1.9606261859582543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6388727', 'n_tokens_mistral': 2088, 'n_tokens_neox': 2015, 'n_words': 274}