1.0.6 • Published 4 years ago

@anshckr/cleanup-scss-files v1.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

MIT License

This package was build cleanup all the unused scss files of a codebase

Installation

Using npm:

$ npm i -g npm
$ npm i @anshckr/cleanup-scss-files

Note: add --save if you are using npm < 5.0.0

In Node.js:

var cleanupSCSSsAtPath = require('@anshckr/cleanup-scss-files');

Pre-requesite

For this utility to work, all the import statements should be in valid format (Please sanitize your scss import statements for this util to work)->

// for importing partials, remove '_' prefix and '.scss' suffix from import statements

@import "variables"; // valid

@import "_variables.scss"; // invalid
@import "_variables"; // invalid
@import "variables.scss"; // invalid

API

1. cleanupSCSSsAtPath (Deletes all the unused SCSS files in the directory)

ParameterTypeDescription
dirPathStringRequired. The directory where you want to run the cleanup at
paramsStartPointSCSSsArrayRequired. Array of starting point scss files to consume during cleanup
paramsIgnoreFilesRegexRegexOptional. Regular expression to match file names to ignore during cleanup. Default: /$^/
paramsIgnoreFoldersRegexRegexOptional. Regular expression to match folder names to ignore during cleanup. Default: /$^/

Usage

Refer the example folder

🤝 Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

License

@anshckr/cleanup-scss-files is freely distributable under the terms of the MIT license.

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago