# @anshckr/cleanup-scss-files

> Cleanup unused scss files in a project

Latest version **1.0.6** (published 2019-12-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @anshckr/cleanup-scss-files
pnpm add @anshckr/cleanup-scss-files
yarn add @anshckr/cleanup-scss-files
bun add @anshckr/cleanup-scss-files
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2019-12-25 |
| First published | 2019-12-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Anshul Nema |
| Maintainers | anshckr |
| Keywords | cleanup, unused, scss, detect, remove |

## Links

- npm: https://www.npmjs.com/package/@anshckr/cleanup-scss-files
- Repository: https://github.com/anshckr/cleanup-scss-files
- Homepage: https://github.com/anshckr/cleanup-scss-files#readme
- Issues: https://github.com/anshckr/cleanup-scss-files/issues
- npm.io page: https://npm.io/package/@anshckr/cleanup-scss-files

## Dependencies (1)

- [n-readlines](https://npm.io/package/n-readlines.md) 1.0.0

## Recent versions

- 1.0.6 (latest) — 2019-12-25
- 1.0.5 — 2019-12-24
- 1.0.4 — 2019-12-21
- 1.0.3 — 2019-12-21
- 1.0.2 — 2019-12-20
- 1.0.1 — 2019-12-20
- 1.0.0 — 2019-12-20

## README

[![MIT License][license-image]][license-url]

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

## Installation

Using npm:
```shell
$ npm i -g npm
$ npm i @anshckr/cleanup-scss-files
```
Note: add --save if you are using npm < 5.0.0

In Node.js:
```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)

| Parameter | Type | Description |
| :--- | :--- | :--- |
| `dirPath`  | `String`  | **Required**. The directory where you want to run the cleanup at  |
| `paramsStartPointSCSSs` | `Array` | **Required**. Array of starting point scss files to consume during cleanup |
| `paramsIgnoreFilesRegex` | `Regex` | **Optional**. Regular expression to match file names to ignore during cleanup. **Default:** /$^/ |
| `paramsIgnoreFoldersRegex` | `Regex` | **Optional**. Regular expression to match folder names to ignore during cleanup. **Default:** /$^/ |

## Usage

Refer the [example folder](https://github.com/anshckr/cleanup-scss-files/tree/master/example)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/anshckr/cleanup-scss-files/issues). You can also take a look at the [contributing guide](https://github.com/anshckr/cleanup-scss-files/blob/master/CONTRIBUTING.md).

## 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](https://github.com/anshckr/cleanup-scss-files/blob/master/LICENSE).
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: LICENSE

---
_Source: https://npm.io/package/@anshckr/cleanup-scss-files · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
