<commit_before>module.exports = (grunt) ->
  buildDir = 'build/'
  coffeeFiles = '**/*.coffee'
  featureDir = 'features/'
  featureFiles = '**/*.feature'
  hamlFiles = '**/*.haml'
  currentDir = process.env.PWD
  sassFiles = ['**/*.scss', '**/*.sass']
  sourceDir = 'source'
  testDir = 'test'
  testFiles = ['**/*.coffee', '**/*.js']

  extension = (path) ->
    path.match(/\.([^.]+)$/)[1]
  replaceExtension = (path, extension) ->
    path.replace /\.[^.]+$/, extension
  removePathPrefix = (prefix, path) ->
    path.replace new RegExp("^#{prefix}\\/"), ''

  grunt.loadNpmTasks 'grunt-contrib-clean'
  grunt.loadNpmTasks 'grunt-contrib-coffee'
  grunt.loadNpmTasks 'grunt-contrib-copy'
  grunt.loadNpmTasks 'grunt-contrib-watch'
  grunt.loadNpmTasks 'grunt-haml'
  grunt.loadNpmTasks 'grunt-mocha-test'
  grunt.loadNpmTasks 'grunt-protractor-runner'
  grunt.loadNpmTasks 'grunt-sass'

  grunt.initConfig
    pkg: grunt.file.readJSON 'package.json'
    clean:
      all:
        expand: true
        cwd: buildDir
        src: '**/*'
      js:
        expand: true
        cwd: buildDir
        src: ['**/*.js', '**/*.js.map']
      html:
        expand: true
        cwd: buildDir
        src: '**/*.html'
      css:
        expand: true
        cwd: buildDir
        src: ['**/*.css', '**/*.css.map']
    coffee:
      options:
        sourceMap: true
      build:
        expand: true
        cwd: sourceDir
        src: coffeeFiles
        dest: buildDir
        ext: '.js'
        extDot: 'last'
    copy:
      package:
        src: 'package.json'
        dest: buildDir
    haml:
      options:
        language: 'coffee'
      build:
        expand: true
        cwd: sourceDir
        src: hamlFiles
        dest: buildDir
        ext: '.html'
        extDot: 'last'
    mochaTest:
      test:
        expand: true
        cwd: testDir
        src: testFiles
    protractor:
      cucumber:
        options:
          configFile: 'protractor.conf.js'
          args:
            framework: 'cucumber'
            cucumberOpts:
              require: ['features/support/**/*', 'features/step_definitions/**/*']
            specs: [featureDir + featureFiles]
    sass:
      options:
        sourceMap: true
        includePaths: ['node_modules/foundation-apps/scss/']
      build:
        expand: true
        cwd: sourceDir
        src: sassFiles
        dest: buildDir
        ext: '.css'
        extDot: 'last'
    watch:
      options:
        spawn: false
        cwd: {files: sourceDir}
      coffee:
        files: coffeeFiles
        options:
          event: ['added', 'changed']<commit_msg>Write Cucumber snippets in CoffeeScript. [#89369394]<commit_after>module.exports = (grunt) ->
  buildDir = 'build/'
  coffeeFiles = '**/*.coffee'
  featureDir = 'features/'
  featureFiles = '**/*.feature'
  hamlFiles = '**/*.haml'
  currentDir = process.env.PWD
  sassFiles = ['**/*.scss', '**/*.sass']
  sourceDir = 'source'
  testDir = 'test'
  testFiles = ['**/*.coffee', '**/*.js']

  extension = (path) ->
    path.match(/\.([^.]+)$/)[1]
  replaceExtension = (path, extension) ->
    path.replace /\.[^.]+$/, extension
  removePathPrefix = (prefix, path) ->
    path.replace new RegExp("^#{prefix}\\/"), ''

  grunt.loadNpmTasks 'grunt-contrib-clean'
  grunt.loadNpmTasks 'grunt-contrib-coffee'
  grunt.loadNpmTasks 'grunt-contrib-copy'
  grunt.loadNpmTasks 'grunt-contrib-watch'
  grunt.loadNpmTasks 'grunt-haml'
  grunt.loadNpmTasks 'grunt-mocha-test'
  grunt.loadNpmTasks 'grunt-protractor-runner'
  grunt.loadNpmTasks 'grunt-sass'

  grunt.initConfig
    pkg: grunt.file.readJSON 'package.json'
    clean:
      all:
        expand: true
        cwd: buildDir
        src: '**/*'
      js:
        expand: true
        cwd: buildDir
        src: ['**/*.js', '**/*.js.map']
      html:
        expand: true
        cwd: buildDir
        src: '**/*.html'
      css:
        expand: true
        cwd: buildDir
        src: ['**/*.css', '**/*.css.map']
    coffee:
      options:
        sourceMap: true
      build:
        expand: true
        cwd: sourceDir
        src: coffeeFiles
        dest: buildDir
        ext: '.js'
        extDot: 'last'
    copy:
      package:
        src: 'package.json'
        dest: buildDir
    haml:
      options:
        language: 'coffee'
      build:
        expand: true
        cwd: sourceDir
        src: hamlFiles
        dest: buildDir
        ext: '.html'
        extDot: 'last'
    mochaTest:
      test:
        expand: true
        cwd: testDir
        src: testFiles
    protractor:
      cucumber:
        options:
          configFile: 'protractor.conf.js'
          args:
            framework: 'cucumber'
            cucumberOpts:
              require: ['features/support/**/*', 'features/step_definitions/**/*']
              coffee: true
            specs: [featureDir + featureFiles]
    sass:
      options:
        sourceMap: true
        includePaths: ['node_modules/foundation-apps/scss/']
      build:
        expand: true
        cwd: sourceDir
        src: sassFiles
        dest: buildDir
        ext: '.css'
        extDot: 'last'
    watch:
      options:
        spawn: false
        cwd: {files: sourceDir}
      coffee:
        files: coffeeFiles
        options:
          event: ['added', 'changed']
{'fraction_non_alphanumeric': 0.1449905482041588, 'fraction_numerical': 0.001890359168241966, 'mean_word_length': 1.8522911051212938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3343368', 'n_tokens_mistral': 1790, 'n_tokens_neox': 1763, 'n_words': 374}