<commit_before>module.exports = (grunt) ->
  
  # Project configuration
  grunt.initConfig
    pkg: grunt.file.readJSON("package.json")
    paths:
      build: "static/build"
      src: "static/src"
      deploy: "static/dist"
      components: "static/components"
      html: "static/html"
    
    # Coffeescript Linter
    coffeelint:
      tests:
        files:
          src: ["<%= paths.src %>/scripts/**/*.coffee"]
      options:
        configFile: "coffeelint.json"

    # CoffeeScript
    coffee:
      options:
        sourceMap: false
        sourceRoot: ""

      glob_to_multiple:
        expand: true,
        flatten: false,
        cwd: "<%= paths.src %>/scripts/",
        src: ["**/*.coffee"],
        dest: "<%= paths.build %>/scripts/",
        ext: ".js"
    
    # Compile Sass to CSS -  destination : source
    sass:
      build:
        options:
          style: "compressed"
          sourceComments: "normal"

        files:
          "<%= paths.build %>/styles/main.css": "<%= paths.src %>/styles/main.sass"

    # Compile Jade files
    jade:
      compile:
        options:
          client: true
          namespace: "jade.templates"
          amd: true
          processName: (filename) ->
            name = filename.replace ".jade", ""
            name = name.replace "static/src/templates/", ""
            name = name.replace "/", "."
            return name
          data:
            debug: false
        files:
          "<%= paths.build %>/templates/jade.js": ["<%= paths.src %>/templates/**/*.jade"]

    ##
    ## Deployment Configuration
    ##
    requirejs:
      compile: 
        options: 
          baseUrl: "<%= paths.build %>/scripts/app"
          mainConfigFile: "<%= paths.build %>/scripts/common.js"
          name: "main"
          out: "<%= paths.deploy %>/scripts/main.js"

    cssmin:
      deploy:
        files:
          "<%= paths.deploy %>/styles/main.css": "<%= paths.build %>/styles/main.css"

    uglify:
      deploy:
        files:
          "<%= paths.deploy %>/scripts/require.js": ["<%= paths.components %>/requirejs/require.js"]
          "<%= paths.deploy %>/scripts/main.js": ["<%= paths.deploy %>/scripts/main.js"]
    
    targethtml:
      dev:
        files:
          "static/index.html": "<%= paths.html %>/index.html"
      prod:
        files:
          "static/index.html": "<%= paths.html %>/index.html"

    ##
    ## Watcher Configuation
    ##
    # Simple config to run sass, and coffee any time a js or sass file is added, modified or deleted
    watch:
      coffee:
        files: ["<%= paths.src %>/scripts/**/*.coffee"]
        tasks: ["coffeelint", "coffee"]

      sass:
        files: ["<%= paths.src %>/styles/{,*/}*.scss", "<%= paths.src %>/styles/{,*/}*.sass"]
        tasks: ["sass:server"]

      jade:
        files: ["<%= paths.src %>/templates/**/*.jade"]
        tasks: ["jade"]

      html:
        files: ["html/index.html"]
        tasks: ["env:dev"]

    concurrent:
      build: ["coffee", "sass:build", "jade", "targethtml:dev"]

  # Load the plug-ins
  require("load-grunt-tasks") grunt
  
  # Default tasks
  grunt.registerTask "default", ["concurrent:build"]
  grunt.registerTask "deploy", ["concurrent:build", "requirejs", "cssmin:deploy", "uglify:deploy", "targethtml:prod"]<commit_msg>Fixed grunt html watcher and paths<commit_after>module.exports = (grunt) ->
  
  # Project configuration
  grunt.initConfig
    pkg: grunt.file.readJSON("package.json")
    paths:
      static: "static"
      build: "static/build"
      src: "static/src"
      deploy: "static/dist"
      components: "static/components"
      html: "static/html"
    
    # Coffeescript Linter
    coffeelint:
      tests:
        files:
          src: ["<%= paths.src %>/scripts/**/*.coffee"]
      options:
        configFile: "coffeelint.json"

    # CoffeeScript
    coffee:
      options:
        sourceMap: false
        sourceRoot: ""

      glob_to_multiple:
        expand: true,
        flatten: false,
        cwd: "<%= paths.src %>/scripts/",
        src: ["**/*.coffee"],
        dest: "<%= paths.build %>/scripts/",
        ext: ".js"
    
    # Compile Sass to CSS -  destination : source
    sass:
      build:
        options:
          style: "compressed"
          sourceComments: "normal"

        files:
          "<%= paths.build %>/styles/main.css": "<%= paths.src %>/styles/main.sass"

    # Compile Jade files
    jade:
      compile:
        options:
          client: true
          namespace: "jade.templates"
          amd: true
          processName: (filename) ->
            name = filename.replace ".jade", ""
            name = name.replace "static/src/templates/", ""
            name = name.replace "/", "."
            return name
          data:
            debug: false
        files:
          "<%= paths.build %>/templates/jade.js": ["<%= paths.src %>/templates/**/*.jade"]

    ##
    ## Deployment Configuration
    ##
    requirejs:
      compile: 
        options: 
          baseUrl: "<%= paths.build %>/scripts/app"
          mainConfigFile: "<%= paths.build %>/scripts/common.js"
          name: "main"
          out: "<%= paths.deploy %>/scripts/main.js"

    cssmin:
      deploy:
        files:
          "<%= paths.deploy %>/styles/main.css": "<%= paths.build %>/styles/main.css"

    uglify:
      deploy:
        files:
          "<%= paths.deploy %>/scripts/require.js": ["<%= paths.components %>/requirejs/require.js"]
          "<%= paths.deploy %>/scripts/main.js": ["<%= paths.deploy %>/scripts/main.js"]
    
    targethtml:
      dev:
        files:
          "<%= paths.static %>/index.html": "<%= paths.html %>/index.html"
      prod:
        files:
          "<%= paths.static %>/index.html": "<%= paths.html %>/index.html"

    ##
    ## Watcher Configuation
    ##
    # Simple config to run sass, and coffee any time a js or sass file is added, modified or deleted
    watch:
      coffee:
        files: ["<%= paths.src %>/scripts/**/*.coffee"]
        tasks: ["coffeelint", "coffee"]

      sass:
        files: ["<%= paths.src %>/styles/{,*/}*.scss", "<%= paths.src %>/styles/{,*/}*.sass"]
        tasks: ["sass:server"]

      jade:
        files: ["<%= paths.src %>/templates/**/*.jade"]
        tasks: ["jade"]

      html:
        files: ["<%= paths.html %>/index.html"]
        tasks: ["targethtml:dev"]

    concurrent:
      build: ["coffee", "sass:build", "jade", "targethtml:dev"]

  # Load the plug-ins
  require("load-grunt-tasks") grunt
  
  # Default tasks
  grunt.registerTask "default", ["concurrent:build"]
  grunt.registerTask "deploy", ["concurrent:build", "requirejs", "cssmin:deploy", "uglify:deploy", "targethtml:prod"]
{'fraction_non_alphanumeric': 0.17273813078530906, 'fraction_numerical': 0.0, 'mean_word_length': 1.9446153846153846, 'pattern_counts': {'":': 14, '<': 50, '<?xml version=': 0, '>': 54, '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': '1496915', 'n_tokens_mistral': 2190, 'n_tokens_neox': 2090, 'n_words': 441}