<commit_before>module.exports = (grunt) ->
  # load all grunt tasks
  require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks)
  grunt.loadTasks("build/tasks")

  # configurable paths
  appConfig =
    app: "app"
    test: "test"
    dist: "dist"
    dev: "dev"

  loadMoule = (name) ->
    require("./build/config/#{name}")(grunt, appConfig)

  grunt.initConfig
    appConfig: appConfig
    pkg: grunt.file.readJSON("package.json")

    watch:         loadMoule "watch"
    coffee:        loadMoule "coffee"
    less:          loadMoule "less"
    concat:        loadMoule "concat"
    useminPrepare: loadMoule "usemin_prepare"
    usemin:        loadMoule "usemin"
    htmlmin:       loadMoule "htmlmin"
    copy:          loadMoule "copy"
    coffeelint:    loadMoule "coffeelint"
    ngtemplates:   loadMoule "ngtemplates"
    bower:         loadMoule "bower"
    karma:         loadMoule "karma"
    casper:        loadMoule "casper"
    clean:         loadMoule "clean"
    connect:       loadMoule "connect"

  grunt.renameTask "regarde", "watch"

  grunt.registerTask "timestamp", -> grunt.log.subhead "--- timestamp: #{new Date()}"

  grunt.registerTask "build:dev", [
    "clean"
    "bower"
    "coffeelint"
    "coffee"
    "less"
    "copy:dev"
    "ngtemplates"
  ]

  grunt.registerTask "server", [
    "build:dev"

    "configureProxies"
    "livereload-start"
    "connect:livereload"
    "watch"
  ]

  # run unit tests
  grunt.registerTask "test:unit", [
    "karma:unit"
  ]

  # run unit tests in the watch mode
  grunt.registerTask "test:unit:watch", [
    "karma:watch"
  ]

  # run unit tests in the watch mode
  grunt.registerTask "test:watch", [
    "test:unit:watch"
  ]

  # run unit tests against compiled develepment release
  # and generate code coverage report
  grunt.registerTask "test:unit:coverage", [
    "build:dev"
    "karma:coverage"
  ]

  grunt.registerTask "test:coverage", [
    "test:unit:coverage"
  ]

  # run e2e integration tests
  grunt.registerTask "test:e2e", [
    "build:dev"
    "connect:e2e"
    "karma:e2e"
  ]

  # run casperjs integration tests
  grunt.registerTask "test:casperjs", [
    "build:dev"
    "connect:e2e"
    "casper"
  ]

  # run all tests on the ci server
  grunt.registerTask "test:ci", [
    "build:dev"

    # run unit tests and generate code coverage report
    "karma:coverage"

    # run all integration tests
    "connect:e2e"
    "karma:e2e"
    "casper"
  ]

  grunt.registerTask "test", [
    "karma:unit"
  ]

  grunt.registerTask "build:dist", [
    "test:ci"
    "useminPrepare"
    "htmlmin"
    "concat"
    "copy:dist"
    "usemin"
    "uglify"
    "cssmin"
  ]

  grunt.renameTask "build:dist", "build"<commit_msg>fix(grunt): configure proxies for e2e/integration specs<commit_after>module.exports = (grunt) ->
  # load all grunt tasks
  require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks)
  grunt.loadTasks("build/tasks")

  # configurable paths
  appConfig =
    app: "app"
    test: "test"
    dist: "dist"
    dev: "dev"

  loadMoule = (name) ->
    require("./build/config/#{name}")(grunt, appConfig)

  grunt.initConfig
    appConfig: appConfig
    pkg: grunt.file.readJSON("package.json")

    watch:         loadMoule "watch"
    coffee:        loadMoule "coffee"
    less:          loadMoule "less"
    concat:        loadMoule "concat"
    useminPrepare: loadMoule "usemin_prepare"
    usemin:        loadMoule "usemin"
    htmlmin:       loadMoule "htmlmin"
    copy:          loadMoule "copy"
    coffeelint:    loadMoule "coffeelint"
    ngtemplates:   loadMoule "ngtemplates"
    bower:         loadMoule "bower"
    karma:         loadMoule "karma"
    casper:        loadMoule "casper"
    clean:         loadMoule "clean"
    connect:       loadMoule "connect"

  grunt.renameTask "regarde", "watch"

  grunt.registerTask "timestamp", -> grunt.log.subhead "--- timestamp: #{new Date()}"

  grunt.registerTask "build:dev", [
    "clean"
    "bower"
    "coffeelint"
    "coffee"
    "less"
    "copy:dev"
    "ngtemplates"
  ]

  grunt.registerTask "server", [
    "build:dev"

    "configureProxies"
    "livereload-start"
    "connect:livereload"
    "watch"
  ]

  # run unit tests
  grunt.registerTask "test:unit", [
    "karma:unit"
  ]

  # run unit tests in the watch mode
  grunt.registerTask "test:unit:watch", [
    "karma:watch"
  ]

  # run unit tests in the watch mode
  grunt.registerTask "test:watch", [
    "test:unit:watch"
  ]

  # run unit tests against compiled develepment release
  # and generate code coverage report
  grunt.registerTask "test:unit:coverage", [
    "build:dev"
    "karma:coverage"
  ]

  grunt.registerTask "test:coverage", [
    "test:unit:coverage"
  ]

  # run e2e integration tests
  grunt.registerTask "test:e2e", [
    "build:dev"
    "configureProxies"
    "connect:e2e"
    "karma:e2e"
  ]

  # run casperjs integration tests
  grunt.registerTask "test:casperjs", [
    "build:dev"
    "configureProxies"
    "connect:e2e"
    "casper"
  ]

  # run all tests on the ci server
  grunt.registerTask "test:ci", [
    "build:dev"

    # run unit tests and generate code coverage report
    "karma:coverage"

    "configureProxies"
    "connect:e2e"

    # run all integration tests
    "karma:e2e"
    "casper"
  ]

  grunt.registerTask "test", [
    "karma:unit"
  ]

  grunt.registerTask "build:dist", [
    "test:ci"
    "useminPrepare"
    "htmlmin"
    "concat"
    "copy:dist"
    "usemin"
    "uglify"
    "cssmin"
  ]

  grunt.renameTask "build:dist", "build"
{'fraction_non_alphanumeric': 0.12612612612612611, 'fraction_numerical': 0.002702702702702703, 'mean_word_length': 2.728005372733378, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4962443', 'n_tokens_mistral': 2089, 'n_tokens_neox': 2024, 'n_words': 413}