This script is to take simplify duplicating components in webpages

style-extractor

The purpose of this script is to take simplify duplicating components in webpages.

How to use

  1. Clone the repo

  2. npm install

  3. install typescript if you don’t have it.

  4. > tsc
    
  5. Copy the compiled output to the browser’s debugger.

  6. Run the following in the brower’s console.
    “`

     let css_selector = 'selector for an element';
     // Produces output for react
     style_extractor(css_selector, true)
     // Produces output for inline stylesheets
     style_extractor(css_selector)
     ```
    
  7. Wait for the output

GitHub

View Github