gulp-sassyclean

Find and clean up unused Sass modules from your project build.

Usage no npm install needed!

<script type="module">
  import gulpSassyclean from 'https://cdn.skypack.dev/gulp-sassyclean';
</script>

README

Gulp Sassyclean

npm version npm Build Status

SassyClean logo

Gulp SassyClean scans a project for partials that are never imported. SassyClean provides the option to automatically delete the unused partials or display the file name as a console log.

Getting Started

If you haven't used [grunt][] before, be sure to check out the [Getting Started][] guide, as it explains how to create a [gruntfile][Getting Started] as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:

npm install gulp-sassyclean --save-dev

Then, add it to your gulpfile.js:

var sassyclean = require('gulp-sassyclean');

gulp.task('sassyclean', function () {
  return gulp.src(['./sass/*.scss'])
    .pipe(gulpsassyclean({
      directory: 'modules',
      remove: false
    }));
});

Options

directory

Type: String Default value: 'modules'

The directory option provides the ability to set a directory that contain Sass modules.

remove

Type: Boolean Default value: false

The ablity to automatically delete unused file reference from the project.

Related

Contributing

  1. Fork it
  2. Run npm install
  3. Run Gulp watch gulp
  4. Create your feature branch (git checkout -b my-new-feature)
  5. Commit your changes (git commit -am "Add some feature")
  6. Push to the branch (git push origin my-new-feature)
  7. Create new Pull Request

License

MIT © Ryan Burgess