<commit_before>/*
 * grunt-contrib-sass
 * http://gruntjs.com/
 *
 * Copyright (c) 2012 <NAME>, contributors
 * Licensed under the MIT license.
 */

module.exports = function(grunt) {
  'use strict';

  // TODO: ditch this when grunt v0.4 is released
  grunt.util = grunt.util || grunt.utils;

  var path = require('path');
  var async = grunt.util.async;

  grunt.registerMultiTask('sass', 'Compile Sass to CSS', function() {
    var helpers = require('grunt-lib-contrib').init(grunt);
    var options = helpers.options(this);
    var cb = this.async();
    var args = ['--stdin'].concat(helpers.optsToArgs(options));

    grunt.verbose.writeflags(options, 'Options');

    // TODO: ditch this when grunt v0.4 is released
    this.files = this.files || helpers.normalizeMultiTaskFiles(this.data, this.target);

    async.forEachSeries(this.files, function(el, cb2) {
      var elArgs = [el.dest];
      var src = el.src;
      var files = grunt.file.expandFiles(src);
      var max = files.map(function (filepath) {
        return grunt.file.read(filepath);
      }).join('\n');

      if (path.extname(src) === '.scss') {
        elArgs.push('--scss');
      }

      // Make sure grunt creates the destination folders
      grunt.file.write(el.dest, '');

      // Add dirs of specified files to the sass path
      files.forEach(function(el) {
        elArgs.push('--load-path', path.dirname(el));
      });

      var sass = grunt.util.spawn({
        cmd: process.platform === 'win32' ? 'sass.bat' : 'sass',
        args: elArgs.concat(args)
      }, function(error, result, code) {
        cb2(code > 0);
      }).on('exit', function(code) {
        if ( code === 127 ) {
          grunt.fail.fatal('\nYou need to have Ruby and Sass installed for ' +
            'this task to work.\nMore info: ' +
            'https://github.com/gruntjs/grunt-contrib-sass\n');
        }
      });<commit_msg>Improve `not found` error message<commit_after>/*
 * grunt-contrib-sass
 * http://gruntjs.com/
 *
 * Copyright (c) 2012 <NAME>, contributors
 * Licensed under the MIT license.
 */

module.exports = function(grunt) {
  'use strict';

  // TODO: ditch this when grunt v0.4 is released
  grunt.util = grunt.util || grunt.utils;

  var path = require('path');
  var async = grunt.util.async;

  grunt.registerMultiTask('sass', 'Compile Sass to CSS', function() {
    var helpers = require('grunt-lib-contrib').init(grunt);
    var options = helpers.options(this);
    var cb = this.async();
    var args = ['--stdin'].concat(helpers.optsToArgs(options));

    grunt.verbose.writeflags(options, 'Options');

    // TODO: ditch this when grunt v0.4 is released
    this.files = this.files || helpers.normalizeMultiTaskFiles(this.data, this.target);

    async.forEachSeries(this.files, function(el, cb2) {
      var elArgs = [el.dest];
      var src = el.src;
      var files = grunt.file.expandFiles(src);
      var max = files.map(function (filepath) {
        return grunt.file.read(filepath);
      }).join('\n');

      if (path.extname(src) === '.scss') {
        elArgs.push('--scss');
      }

      // Make sure grunt creates the destination folders
      grunt.file.write(el.dest, '');

      // Add dirs of specified files to the sass path
      files.forEach(function(el) {
        elArgs.push('--load-path', path.dirname(el));
      });

      var sass = grunt.util.spawn({
        cmd: process.platform === 'win32' ? 'sass.bat' : 'sass',
        args: elArgs.concat(args)
      }, function(error, result, code) {
        cb2(code > 0);
      }).on('exit', function(code) {
        if ( code === 127 ) {
          grunt.warn(
            'You need to have Ruby and Sass installed and in your PATH for ' +
            'this task to work. More info: ' +
            'https://github.com/gruntjs/grunt-contrib-sass'
          );
        }
      });
{'fraction_non_alphanumeric': 0.15628245067497404, 'fraction_numerical': 0.008307372793354102, 'mean_word_length': 2.490036231884058, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2586511', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1240, 'n_words': 298}