<commit_before># grunt-sass-compile-imports

> Create an import file by scanning a directory for SASS files

## Getting Started
This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-sass-compile-imports --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-sass-compile-imports');
```

## The "sass_compile_imports" task

### Overview
In your project's Gruntfile, add a section named `sass_compile_imports` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  sass_compile_imports: {
    compile: {
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'sass/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```

This will generate a file called _partials.scss in a directory named sass. The contents of the file will be similar to the following:

```scss
// This file imports all other named scss files.
// It is automatically generated by the grunt sassimports task.
// Do not directly modify this file.

@import "path/to/partial/variables";
@import "path/to/partial/fonts";

### Options

#### options.removeExtension
Type: `Boolean`
Default value: `true`

Flag specifying if the generated paths should exclude the .scss extension.

```js
grunt.initConfig({
  sass_compile_imports: {
    keep_extension: {
      options: {
          removeExtension: false
      },
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'sass/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```
This will generate the imports in the following way:

```scss
// This file imports all other named scss files.
// It is automatically generated by the grunt sassimports task.
// Do not directly modify this file.

@import "path/to/partial/variables.scss";
@import "path/to/partial/fonts.scss";
```

#### options.quiet
Type: `Boolean`
Default value: `false`

A flag used to specify if the task should output information about the files it is importing to the command line

```js
grunt.initConfig({
  sass_compile_imports: {
    keep_extension: {
      options: {
          quiet: true
      },
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'sass/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```

#### options.importPath
Type: `String`
Default value: `false`

If set the specified path will be used to import the sass files rather than the one automatically created.
A trailing slash will be automatically added if one is not present.

```js
grunt.initConfig({
  sass_compile_imports: {
    import_path: {
      options: {
          importPath: '../components'
      },
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'components/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```
This will generate the imports in the following way:

```scss
// This file imports all other named scss files.
// It is automatically generated by the grunt sassimports task.
// Do not directly modify this file.

@import "../components/variables";
@import "../components/fonts";
```

#### options.replacePath
Type: `String`
Default value: `false`

If set the import path for each partial will be modified using the pattern provided.

```js
grunt.initConfig({
  sass_compile_imports: {
    replace_path: {
      options: {
          replacePath: {
              pattern: '/location',
              replace: '../_styles'
          }
      },
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'components/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```

### Usage Examples

Coming soon


## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
_(Nothing yet)_
<commit_msg>Add the missing snippet closure<commit_after># grunt-sass-compile-imports

> Create an import file by scanning a directory for SASS files

## Getting Started
This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-sass-compile-imports --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-sass-compile-imports');
```

## The "sass_compile_imports" task

### Overview
In your project's Gruntfile, add a section named `sass_compile_imports` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  sass_compile_imports: {
    compile: {
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'sass/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```

This will generate a file called _partials.scss in a directory named sass. The contents of the file will be similar to the following:

```scss
// This file imports all other named scss files.
// It is automatically generated by the grunt sassimports task.
// Do not directly modify this file.

@import "path/to/partial/variables";
@import "path/to/partial/fonts";
```

### Options

#### options.removeExtension
Type: `Boolean`
Default value: `true`

Flag specifying if the generated paths should exclude the .scss extension.

```js
grunt.initConfig({
  sass_compile_imports: {
    keep_extension: {
      options: {
          removeExtension: false
      },
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'sass/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```
This will generate the imports in the following way:

```scss
// This file imports all other named scss files.
// It is automatically generated by the grunt sassimports task.
// Do not directly modify this file.

@import "path/to/partial/variables.scss";
@import "path/to/partial/fonts.scss";
```

#### options.quiet
Type: `Boolean`
Default value: `false`

A flag used to specify if the task should output information about the files it is importing to the command line

```js
grunt.initConfig({
  sass_compile_imports: {
    keep_extension: {
      options: {
          quiet: true
      },
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'sass/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```

#### options.importPath
Type: `String`
Default value: `false`

If set the specified path will be used to import the sass files rather than the one automatically created.
A trailing slash will be automatically added if one is not present.

```js
grunt.initConfig({
  sass_compile_imports: {
    import_path: {
      options: {
          importPath: '../components'
      },
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'components/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```
This will generate the imports in the following way:

```scss
// This file imports all other named scss files.
// It is automatically generated by the grunt sassimports task.
// Do not directly modify this file.

@import "../components/variables";
@import "../components/fonts";
```

#### options.replacePath
Type: `String`
Default value: `false`

If set the import path for each partial will be modified using the pattern provided.

```js
grunt.initConfig({
  sass_compile_imports: {
    replace_path: {
      options: {
          replacePath: {
              pattern: '/location',
              replace: '../_styles'
          }
      },
      target: 'sass/_partials.scss',
      files: [{
          expand: true,
          cwd   : 'components/partials/',
          src   : ['**/*.scss']
      }]
    }
  }
});
```

### Usage Examples

Coming soon


## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
_(Nothing yet)_

{'fraction_non_alphanumeric': 0.12161246612466124, 'fraction_numerical': 0.0006775067750677507, 'mean_word_length': 2.7980274442538593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6899694', 'n_tokens_mistral': 2745, 'n_tokens_neox': 2660, 'n_words': 918}