Giter Site home page Giter Site logo

josephjlee / extract-css Goto Github PK

View Code? Open in Web Editor NEW

This project forked from projectwallace/extract-css

0.0 1.0 0.0 138 KB

Extract all CSS from a webpage, packaged as a Now V2 Lambda

Home Page: https://extract-css.now.sh

JavaScript 73.95% HTML 26.05%

extract-css's Introduction

Extract CSS

Get all the CSS from a webpage.

Platform: Now V2 Project: Wallace

The problem

The folks from CSS Stats have created get-css, a package to get all the CSS from a given webpage. One downside, however, is that it only works for server side rendered applications.

The solution

This package uses an actual browser under the hood to get all the CSS and exposes an HTTP endpoint that accepts a url to get the CSS from.

Local testing

I have no idea how local testing for Now is supposed to work, so I created a tiny HTTP server in dev.js that calls the actual function that gets deployed. Run ENV=dev npm run dev to run a local version of the function for local testing.

Credits

extract-css's People

Contributors

bartveneman avatar dependabot[bot] avatar

Watchers

 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.