Code Monkey home page Code Monkey logo

dust-me-to-sass's Introduction

Dust-Me-to-Sass

Takes a number of dust-me exports and a sourcemap file and produce a new export showing where all the used/unused selector are in the original source file.

This requires a modified version of Dust-Me that can record the column numbers of the found selectors in it's json exports.

Install

  • Clone this repo using git
  • Inside the project directory run npm install

How to use

  • Generate your css files as normal but make sure the generate source maps option is enabled. This will be different depending on which generator you use.

  • Use Dust-Me as normal on your site and export used and unused selectors for each host name you are auditing.

  • Copy all the dust-me exports and the sourcemap files into a convenient location.

  • from the Dust-me-to-sass directory run 'node index.js -m [path/to/sourcemap.map] -o [outputfile.json] [path/to/dustMeExport_1.json] [path/to/dustMeExport_2.json] [path/to/dustMeExport_n.json] [...]

This will create a file [outputfile.json] with a full report of all selectors found in all the exports and sourcemap.map, with their source file, line and column attached.

The report is structured by source file name. Used and unused selectors are listed separately.

It also creates summary.json which lists all the source files and how many used/unused selectors were found in them.

dust-me-to-sass's People

Contributors

qazzian avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.