<commit_before># requires grunt 0.4.x
sourceDir     = "source/code"
buildDir      = "build/UMD"
sourceSpecDir = "source/spec"
buildSpecDir  = "build/spec"
distDir       = "build/dist"

gruntFunction = (grunt) ->
  _ = grunt.util._
  pkg = grunt.file.readJSON('package.json')
  banner = """
      /*
      * #{ pkg.name } - version #{ pkg.version }
      * Compiled on #{ grunt.template.today("yyyy-mm-dd h:MM:ss") }
      * #{ pkg.repository.url }
      * Copyright(c) #{ grunt.template.today("yyyy") } #{ pkg.author.name } (#{ pkg.author.email } )
      * Licensed #{ pkg.licenses[0].type } #{ pkg.licenses[0].url }
      */\n"""
  bannerMin = """
    /* #{ pkg.name } #{ pkg.version } (#{ grunt.template.today("yyyy-mm-dd") }), #{ pkg.repository.url }
       #{ pkg.author.email }, Lisense: #{ pkg.licenses[0].type } */\n"""

  gruntConfig =
    meta: {banner, bannerMin}
    options: {sourceDir, buildDir, sourceSpecDir, buildSpecDir, distDir}

    ### NOTE: uRequire config is used as a testbed & example, thus so many comments :-) ###
    urequire:
      # @note any urequire task starting with '_' is ignored as grunt target
      # and only used for `derive`-ing.
      # These are the defaults, when a task has no 'derive' at all.
      # Use `derive:[]` to skip deriving it in tasks with no 'derive'.
      _defaults:
        bundle:
          path: "#{sourceDir}"

          # include all but exclude some filez
          filez: [/./, '!**/draft/*.*', '!uRequireConfig*']

          # 2 ways to say "I want all non-`resource` matched filez to<commit_msg>more docs updating of Gruntfile as uRequire examples<commit_after># requires grunt 0.4.x
sourceDir     = "source/code"
buildDir      = "build/UMD"
sourceSpecDir = "source/spec"
buildSpecDir  = "build/spec"
distDir       = "build/dist"

gruntFunction = (grunt) ->
  _ = grunt.util._
  pkg = grunt.file.readJSON('package.json')
  banner = """
      /*
      * #{ pkg.name } - version #{ pkg.version }
      * Compiled on #{ grunt.template.today("yyyy-mm-dd h:MM:ss") }
      * #{ pkg.repository.url }
      * Copyright(c) #{ grunt.template.today("yyyy") } #{ pkg.author.name } (#{ pkg.author.email } )
      * Licensed #{ pkg.licenses[0].type } #{ pkg.licenses[0].url }
      */\n"""
  bannerMin = """
    /* #{ pkg.name } #{ pkg.version } (#{ grunt.template.today("yyyy-mm-dd") }), #{ pkg.repository.url }
       #{ pkg.author.email }, Lisense: #{ pkg.licenses[0].type } */\n"""

  gruntConfig =
    meta: {banner, bannerMin}
    options: {sourceDir, buildDir, sourceSpecDir, buildSpecDir, distDir}

    ### NOTE: uRequire config is used as a testbed & example, thus so many comments :-) ###

    # The `'urequire:XXX'` tasks in summary do some or all of those
    #  * derive from 'someTask' (and/or '_defaults') with some differences
    #  * have a `path` as a source
    #  * filter `filez` within the `path`
    #  * save everything at `dstPath`
    #  * converts all modules to UMD/AMD or a single `uberscore-min.js` with `combined` template
    #  * copies all other (non-module) files at `dstPath`
    #  * export a global `window._B` with a `noConflict()`
    #  * uglifies combined file with some `uglify2` settings
    #  * injects deps in modules
    #  * injects strings inside code bodies
    #  * add banners etc
    #  * manipulate modules:
    #     * remove some matched code 'skeletons'
    #     * replace some deps in arrays, `require`s etc
    #     * remove some code and a dependency from a specific file.
    urequire:
      # @note any urequire task starting with '_' is ignored as grunt target
      # and only used for `derive`-ing.
      # These are the defaults, when a task has no 'derive' at all.
      # Use `derive:[]` to skip deriving it in tasks with no 'derive'.
      _defaults:
        bundle:
          path: "#{sourceDir}"

          # include all but exclude some filez
          filez: [/./, '!**/draft/*.*', '!uRequireConfig*']

          # 2 ways to say "I want all non-`resource` matched filez to
{'fraction_non_alphanumeric': 0.14956304619225969, 'fraction_numerical': 0.0032459425717852684, 'mean_word_length': 2.602517985611511, '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': '715415', 'n_tokens_mistral': 1339, 'n_tokens_neox': 1289, 'n_words': 373}