<commit_before>const path = require('path');
const fs = require('fs');
const sass = require('node-sass');
const { promisify } = require('util');
const mkdirp = require('mkdirp');
const renderAsPromised = promisify(sass.render);
const writeFileAsPromised = promisify(fs.writeFile);
const mkdirpAsPromised = promisify(mkdirp);

module.exports = function (grunt) {
  grunt.registerMultiTask('sass', 'compile sass', function () {
    let done = this.async(),
      promises;

    mkdirpAsPromised(path.dirname(this.data.dest))
      .then(
        Promise.all(this.filesSrc.map((file) =>
          renderAsPromised({ file })
            .then(({ css }) => writeFileAsPromised(this.data.dest, css)))
        ))
      .then(() => {
        grunt.log.ok(`Written ${this.data.dest}`);
        done();
      })
      .catch(error => {
        grunt.log.error(error);
        done(false);
      });<commit_msg>Fix grunt task on watch<commit_after>const path = require('path');
const fs = require('fs');
const sass = require('node-sass');
const { promisify } = require('util');
const mkdirp = require('mkdirp');
const renderAsPromised = promisify(sass.render);
const writeFileAsPromised = promisify(fs.writeFile);
const mkdirpAsPromised = promisify(mkdirp);

module.exports = function (grunt) {
  grunt.registerMultiTask('sass', 'compile sass', function () {
    let done = this.async(),
      promises;
    mkdirpAsPromised(path.dirname(this.data.dest))
      .then(() => Promise.all(this.filesSrc.map((file) =>
        renderAsPromised({ file })
          .then(({ css }) => writeFileAsPromised(this.data.dest, css))
          .then(() => grunt.log.ok(`Written ${this.data.dest}`))
      )))
      .then(done)
      .catch(error => {
        grunt.log.error(error);
        done(false);
      });
{'fraction_non_alphanumeric': 0.16955791829882486, 'fraction_numerical': 0.0, 'mean_word_length': 3.318840579710145, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '2535332', 'n_tokens_mistral': 583, 'n_tokens_neox': 577, 'n_words': 106}