<commit_before>server = require "./server"
path   = require "path"
fs     = require "fs"
wrench = require "wrench"

# Path variables
examplePath    = "example/"
finalBuildPath = "lib/"
componentFile  = "component.json"

module.exports = (grunt) ->
  grunt.loadNpmTasks "grunt-contrib-coffee"
  grunt.loadNpmTasks "grunt-contrib-concat"
  grunt.loadNpmTasks "grunt-contrib-stylus"
  grunt.loadNpmTasks "grunt-contrib-jade"
  grunt.loadNpmTasks "grunt-contrib-copy"
  grunt.loadNpmTasks "grunt-contrib-clean"
  grunt.loadNpmTasks "grunt-contrib-watch"
  grunt.loadNpmTasks "grunt-contrib-uglify"

  # Internal functions
  setupStream = (stream) ->
    stream.setEncoding "utf8"
    stream.on "data", (data) -> console.log data

  spawn = (options, done = ->) ->
    fork = grunt.util.spawn options, done
    setupStream fork.stdout
    setupStream fork.stderr

  grunt.initConfig
    pkg: grunt.file.readJSON "package.json"

    #
    # Coffeescript section
    # Compile all coffeescripts to tmp/app before concatenating
    #
    coffee:
      options:
        bare: true
      appCoffee:
        expand: true
        cwd:    "src"
        src:    ["**/*.coffee"]
        dest:   "tmp/app/"
        ext:    ".js"

    #
    # Concat section
    # vendorJs  - compile all the vendor codes from bower
    # appJs     - concat all the application code into MacGyver.js<commit_msg>Changed out output is piped.<commit_after>server = require "./server"
path   = require "path"
fs     = require "fs"
wrench = require "wrench"

# Path variables
examplePath    = "example/"
finalBuildPath = "lib/"
componentFile  = "component.json"

module.exports = (grunt) ->
  grunt.loadNpmTasks "grunt-contrib-coffee"
  grunt.loadNpmTasks "grunt-contrib-concat"
  grunt.loadNpmTasks "grunt-contrib-stylus"
  grunt.loadNpmTasks "grunt-contrib-jade"
  grunt.loadNpmTasks "grunt-contrib-copy"
  grunt.loadNpmTasks "grunt-contrib-clean"
  grunt.loadNpmTasks "grunt-contrib-watch"
  grunt.loadNpmTasks "grunt-contrib-uglify"

  # Internal functions
  spawn = (options, done = ->) ->
    options.opts ?= stdio: "inherit"
    grunt.util.spawn options, done

  grunt.initConfig
    pkg: grunt.file.readJSON "package.json"

    #
    # Coffeescript section
    # Compile all coffeescripts to tmp/app before concatenating
    #
    coffee:
      options:
        bare: true
      appCoffee:
        expand: true
        cwd:    "src"
        src:    ["**/*.coffee"]
        dest:   "tmp/app/"
        ext:    ".js"

    #
    # Concat section
    # vendorJs  - compile all the vendor codes from bower
    # appJs     - concat all the application code into MacGyver.js
{'fraction_non_alphanumeric': 0.1127134724857685, 'fraction_numerical': 0.0003795066413662239, 'mean_word_length': 2.7496443812233284, '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': '1627030', 'n_tokens_mistral': 913, 'n_tokens_neox': 899, 'n_words': 204}