sass-unused2

0.2.2 • Public • Published

sass-unused2

Build Status

A utility for finding unused variables, mixins and functions in a collection of SASS files, built on the gonzales-pe parser.

Usage

Command Line

npm install -g sass-unused2
sass-unused 'src/**/*.scss'

This will parse all SASS files in 'src' and print a list of identifiers of variables, functions and mixins which are declared but not referenced elsewhere.

Library

var sassUnused = require('sass-unused2')

sassUnused.findUnused('src/**/*.scss')
  .forEach(ident => console.log(ident))

Caveats

This tool is quite dumb, it assumes that all variables, functions and mixins live in the same namespace and can be identified uniquely via their identifiers.

Readme

Keywords

none

Package Sidebar

Install

npm i sass-unused2

Weekly Downloads

1

Version

0.2.2

License

ISC

Last publish

Collaborators

  • adelura