<commit_before>'use strict';

var path = require('path');
var fs = require('fs');
var fse = require('fs-extra');
var chalk = require('chalk');
var q = require('q');
var sassdoc = require('sassdoc');

var copy = q.denodeify(fse.copy);

// Set your Sass project (the one you're generating docs for) path.
// Relative to this Gruntfile.
var projectPath = '../';

// Project path helper.
var project = function () {
  var args = Array.prototype.slice.call(arguments);
  args.unshift(projectPath);
  return path.resolve.apply(path, args);
};

// Project specific paths.
var dirs = {<% if (useSass) { %>
  scss: 'scss',<% } %>
  css: 'assets/css',
  js: 'assets/js',
  tpl: 'views',
  src: project('sass'),
  docs: project('docs')
};

// Tasks configs.
var config = {

  dirs: dirs,<% if (useSass) { %>

  sass: {
    options: {
      style: 'compressed'
    },
    develop: {
      files: [{
        expand: true,
        cwd: '<%%= dirs.scss %>',
        src: ['*.scss'],
        dest: '<%%= dirs.css %>',
        ext: '.css'
      }]
    }
  },<% } %>

  watch: {<% if (useSass) { %>
    scss: {
      files: ['<%%= dirs.scss %>/**/*.scss'],
      tasks: ['sass:develop', 'autoprefixer:develop', 'dumpCSS']
    },<% } else { %>
    css: {
      files: ['<%= dirs.css %>/**/*.css'],
      tasks: ['dumpCSS']
    },<% } %>
    js: {
      files: ['<%%= dirs.js %>/**/*.js'],
      tasks: ['dumpJS']
    },
    tpl: {
      files: ['<%%= dirs.tpl %>/**/*.swig'],
      tasks: ['compile:develop']
    }
  },

  browserSync: {
    options: {
      watchTask: true,
      server: {
        baseDir: '<%%= dirs.docs %>'
      }
    },
    develop: {
      bsFiles: {
        src: [
          '<%%= dirs.docs %>/*.html',
          '<%%= dirs.docs %>/**/*.css',
          '<%%= dirs.docs %>/**/*.js'
        ]
      }
    }
  },

  autoprefixer: {
    options: {
      browsers: ['last 2 version', '> 1%', 'ie 9']
    },
    develop: {
      files: [{
        expand: true,
        cwd: '<%%= dirs.css %>',
        src: '{,*/}*.css',
        dest: '<%%= dirs.css %>'
      }]
    }
  },

  uglify: {
    options: {},
    develop: {
      files: {
        '<%%= dirs.js %>/main.min.js': ['<%%= dirs.js %>/main.js']
      }
    }
  },

  // SassDoc compilation (documentize).
  // See: https://github.com/SassDoc/sassdoc/wiki/Customising-the-View
  compile: {
    options: {
      verbose: true,
      theme: '.',
      // basePath: '',
      // package: project('package.json'),
      // groups: {
      //   'undefined': 'General'
      // }
    },
    develop: {
      src: '<%%= dirs.scss %>',
      dest: '<%%= dirs.docs %>',
    }
  }

};


module.exports = function (grunt) {

  // Load all grunt tasks matching the `grunt-*` pattern.
  require('load-grunt-tasks')(grunt);
<commit_msg>fix(grunt): correct compile task source<commit_after>'use strict';

var path = require('path');
var fs = require('fs');
var fse = require('fs-extra');
var chalk = require('chalk');
var q = require('q');
var sassdoc = require('sassdoc');

var copy = q.denodeify(fse.copy);

// Set your Sass project (the one you're generating docs for) path.
// Relative to this Gruntfile.
var projectPath = '../';

// Project path helper.
var project = function () {
  var args = Array.prototype.slice.call(arguments);
  args.unshift(projectPath);
  return path.resolve.apply(path, args);
};

// Project specific paths.
var dirs = {<% if (useSass) { %>
  scss: 'scss',<% } %>
  css: 'assets/css',
  js: 'assets/js',
  tpl: 'views',
  src: project('sass'),
  docs: project('docs')
};

// Tasks configs.
var config = {

  dirs: dirs,<% if (useSass) { %>

  sass: {
    options: {
      style: 'compressed'
    },
    develop: {
      files: [{
        expand: true,
        cwd: '<%%= dirs.scss %>',
        src: ['*.scss'],
        dest: '<%%= dirs.css %>',
        ext: '.css'
      }]
    }
  },<% } %>

  watch: {<% if (useSass) { %>
    scss: {
      files: ['<%%= dirs.scss %>/**/*.scss'],
      tasks: ['sass:develop', 'autoprefixer:develop', 'dumpCSS']
    },<% } else { %>
    css: {
      files: ['<%= dirs.css %>/**/*.css'],
      tasks: ['dumpCSS']
    },<% } %>
    js: {
      files: ['<%%= dirs.js %>/**/*.js'],
      tasks: ['dumpJS']
    },
    tpl: {
      files: ['<%%= dirs.tpl %>/**/*.swig'],
      tasks: ['compile:develop']
    }
  },

  browserSync: {
    options: {
      watchTask: true,
      server: {
        baseDir: '<%%= dirs.docs %>'
      }
    },
    develop: {
      bsFiles: {
        src: [
          '<%%= dirs.docs %>/*.html',
          '<%%= dirs.docs %>/**/*.css',
          '<%%= dirs.docs %>/**/*.js'
        ]
      }
    }
  },

  autoprefixer: {
    options: {
      browsers: ['last 2 version', '> 1%', 'ie 9']
    },
    develop: {
      files: [{
        expand: true,
        cwd: '<%%= dirs.css %>',
        src: '{,*/}*.css',
        dest: '<%%= dirs.css %>'
      }]
    }
  },

  uglify: {
    options: {},
    develop: {
      files: {
        '<%%= dirs.js %>/main.min.js': ['<%%= dirs.js %>/main.js']
      }
    }
  },

  // SassDoc compilation (documentize).
  // See: https://github.com/SassDoc/sassdoc/wiki/Customising-the-View
  compile: {
    options: {
      verbose: true,
      theme: '.',
      // basePath: '',
      // package: project('package.json'),
      // groups: {
      //   'undefined': 'General'
      // }
    },
    develop: {
      src: '<%%= dirs.src %>',
      dest: '<%%= dirs.docs %>',
    }
  }

};


module.exports = function (grunt) {

  // Load all grunt tasks matching the `grunt-*` pattern.
  require('load-grunt-tasks')(grunt);

{'fraction_non_alphanumeric': 0.2306038344382727, 'fraction_numerical': 0.0010750761512273786, 'mean_word_length': 1.9898232458489555, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 51, 'https://': 2, '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': '4014359', 'n_tokens_mistral': 2132, 'n_tokens_neox': 2059, 'n_words': 408}