<commit_before>###
Sass
https://github.com/sindresorhus/grunt-sass
Compiles Sass with node-sass
###

sass = require('node-sass')
{ castToSass } = require('node-sass-utils')(sass)
{ get } = require('lodash')

module.exports = ->
  @config 'sass',
    build:
      options:
        outputStyle: 'nested'
        sourceMap: true
        functions:

          'kotsu-path($query)': (query) =>
            query = query.getValue()
            baseLocale = @config('i18n.baseLocale')
            paths = @config.process(@config('data')(baseLocale).path)
            return castToSass(get(paths, query))

      files: [
        expand: true
        cwd: '<%= path.source.styles %>'
        src: '{,**/}*.scss'
        dest: '<%= path.build.styles %>'
        ext: '.compiled.css'
      ]<commit_msg>[grunt] document Sass task `kotsu-path()` function<commit_after>###
Sass
https://github.com/sindresorhus/grunt-sass
Compiles Sass with node-sass
###

sass = require('node-sass')
{ castToSass } = require('node-sass-utils')(sass)
{ get } = require('lodash')

module.exports = ->
  @config 'sass',
    build:
      options:
        outputStyle: 'nested'
        sourceMap: true
        functions:

          ###*
           * Get specified path from shared Grunt `data.path`
           * @param  {array|string} query Query to property in `data.path`, which contains
           *                              needed path, according to https://lodash.com/docs#get
           * @return {string}             Requested path
           * @example `$images-path: '/' + kotsu-path(images);`
          ###
          'kotsu-path($query)': (query) =>
            query = query.getValue()
            baseLocale = @config('i18n.baseLocale')
            paths = @config.process(@config('data')(baseLocale).path)
            return castToSass(get(paths, query))

      files: [
        expand: true
        cwd: '<%= path.source.styles %>'
        src: '{,**/}*.scss'
        dest: '<%= path.build.styles %>'
        ext: '.compiled.css'
      ]
{'fraction_non_alphanumeric': 0.1613861386138614, 'fraction_numerical': 0.0019801980198019802, 'mean_word_length': 2.1140215716486903, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '203560', 'n_tokens_mistral': 650, 'n_tokens_neox': 631, 'n_words': 124}