معرفی شرکت ها


find-unused-sass-variables-4.0.8


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

A small tool to find unused Sass variables
ویژگی مقدار
سیستم عامل -
نام فایل find-unused-sass-variables-4.0.8
نام find-unused-sass-variables
نسخه کتابخانه 4.0.8
نگهدارنده ['xhmikosr', 'johann-s']
ایمیل نگهدارنده ['xhmikosr@gmail.com', 'johann.servoire@gmail.com']
نویسنده XhmikosR
ایمیل نویسنده xhmikosr@gmail.com
آدرس صفحه اصلی git+https://github.com/XhmikosR/find-unused-sass-variables.git
آدرس اینترنتی https://github.com/XhmikosR/find-unused-sass-variables#readme
مجوز MIT
# find-unused-sass-variables [![npm version](https://img.shields.io/npm/v/find-unused-sass-variables?logo=npm&logoColor=fff)](https://www.npmjs.com/package/find-unused-sass-variables) [![Build Status](https://img.shields.io/github/actions/workflow/status/XhmikosR/find-unused-sass-variables/test.yml?branch=main&label=CI&logo=github)](https://github.com/XhmikosR/find-unused-sass-variables/actions/workflows/test.yml?query=branch%3Amain) A simple tool to check for unused Sass variables in a directory. ## Install ```shell npm install find-unused-sass-variables --save-dev ``` ## Usage ```shell find-unused-sass-variables folder [, folder2...] --ignore "$my-var,$my-second-var" -e scss -e css # or fusv folder [, folder2...] ``` ## API ```js import fusv from 'find-unused-sass-variables' // 'directory' is a folder let unused = fusv.find('directory') // Array of unused variables console.log(unused.unused); // Array<{ name: string, line: string, file: string }> /* * [ * { * name = '$foo'; * file = 'file where this variable can be found'; * line = 'line of file'; * }, * { * .... * } * ] */ console.log(unused.total); // Total number of variables in the files // ignoring variables const ignoredVars = ['$my-var', '$my-second-var'] unused = fusv.find('directory', { ignore: ignoredVars }) // specifing file extensions unused = fusv.find('directory', { fileExtensions: ['css','scss']}) // asynchronous usage let unused = await fusv.findAsync('directory') // or like a Promise let unused = fusv.findAsync('directory').then(result => { console.log(unused.unused); }) ``` ### find(dir, options) * `dir`: string * `options`: optional options Object Returns an object with `unused` and `total`. `unused` has the array of unused variables and `total` has the sum of all variables in the files (unused and used ones). ### findAsync(dir, options) * as `find(dir, options)` Returns a Promise which resolves result; is the same as `find(dir, options)` result. #### options.ignore Array of strings of the variables to ignore, e.g. `['$my-var', '$my-second-var']` #### options.fileExtensions Array of file extensions to search for unused variables in. e.g. `['scss']` ## Disable & enable Disable or enable `fusv` with the `fusv-disable` and `fusv-enable` comments: ```scss $used-variable-1: #666; // fusv-disable $unused-variable: #coffee; // fusv-enable $used-variable-2: #ace; ``` ## Notes * The tool's logic is pretty "dumb"; if you use the same name for a variable in different files or namespaces, then it won't distinguish between them. * The tool only looks for `.scss` files currently. ## License [MIT](LICENSE)


نیازمندی

مقدار نام
^9.5.0 commander
^5.0.0 escape-string-regexp
^7.2.3 glob
^1.0.0 picocolors
^8.4.21 postcss
^4.0.6 postcss-scss


زبان مورد نیاز

مقدار نام
18.15.0 Npm


نحوه نصب


نصب پکیج tgz find-unused-sass-variables-4.0.8:

    npm install find-unused-sass-variables-4.0.8.tgz