<commit_before>"use strict"

# Listen on port 35729
LIVERELOAD_PORT = 35729

lrSnippet = require('connect-livereload')( port: LIVERELOAD_PORT )
folderMount = (connect, base) ->
  console.log(base)
  # Serve static files.
  connect.static ( require("path").resolve base )

module.exports = (grunt) ->

  # Project configuration.
  grunt.initConfig
    connect:
      options:
        port: 9000
        hostname: "localhost"
      livereload:
        options:
          middleware: (connect, options) ->
            [lrSnippet, folderMount(connect, "public")]

    # Configuration to be run (and then tested)
    watch:
      options:
        livereload: true

      coffee:
        options:
          livereload: false
        files: ["public/coffee/**/*.coffee"]
        tasks: ["coffee:coffees"]

      livereload:
        options:
          cwd: "./public"
          livereload: LIVERELOAD_PORT
        files: ["**/*.html","css/**/*.css","js/**/*.js"]

    # browser open
    open:
      server:
        path: "http://local.jp:<%= connect.options.port %>"
        app: 'Google Chrome Canary'
#        app: 'Google Chrome'
#        file:
#        path : '/etc/hosts'
    
    coffee:
      grunt:
        files:
          ".Gruntfile.js": "Gruntfile.coffee"
      coffees:
        options:
          bare: true
        expand: true
        flatten: true
        src: ['public/coffee/**/*.coffee']
        dest: 'public/js/'
        ext: '.js'


  # modules load
  require('matchdep').filterDev('grunt-*').forEach grunt.loadNpmTasks

  # task configure
  grunt.registerTask "default", ["coffee", "connect", "open", "watch"]<commit_msg>Mod Gruntfile.coffee<commit_after>"use strict"

# Listen on port 35729
LIVERELOAD_PORT = 35729

lrSnippet = require('connect-livereload')( port: LIVERELOAD_PORT )
folderMount = (connect, base) ->
  console.log(base)
  # Serve static files.
  connect.static ( require("path").resolve base )

module.exports = (grunt) ->

  # Project configuration.
  grunt.initConfig
    connect:
      options:
        port: 9000
        hostname: "localhost"
      livereload:
        options:
          middleware: (connect, options) ->
            [lrSnippet, folderMount(connect, "public")]

    # Configuration to be run (and then tested)
    watch:
      options:
        livereload: true

      coffee:
        options:
          livereload: false
        files: ["public/coffee/**/*.coffee"]
        tasks: ["coffee:coffees"]

      livereload:
        options:
          cwd: "./public"
          livereload: LIVERELOAD_PORT
        files: ["**/*.html","css/**/*.css","js/**/*.js"]

    # browser open
    open:
      server:
        path: "http://localhost:<%= connect.options.port %>"
        app: 'Google Chrome Canary'
#        app: 'Google Chrome'
#      file:
#        path: '/etc/hosts'
#        app: 'Sublime Text'

    coffee:
      grunt:
        files:
          ".Gruntfile.js": "Gruntfile.coffee"
      coffees:
        options:
          bare: true
        expand: true
        flatten: true
        src: ['public/coffee/**/*.coffee']
        dest: 'public/js/'
        ext: '.js'


  # modules load
  require('matchdep').filterDev('grunt-*').forEach grunt.loadNpmTasks

  # task configure
  grunt.registerTask "default", ["coffee", "connect", "open", "watch"]
{'fraction_non_alphanumeric': 0.14112658994548757, 'fraction_numerical': 0.008479709267110842, 'mean_word_length': 2.1160377358490567, 'pattern_counts': {'":': 2, '<': 5, '<?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': '3048552', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1021, 'n_words': 235}