GithubHelp home page GithubHelp logo

danieldiekmeier / purgecss Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fullhuman/purgecss

0.0 1.0 0.0 13.48 MB

Remove unused CSS

Home Page: https://purgecss.com

License: MIT License

Shell 0.03% JavaScript 4.31% TypeScript 81.38% CSS 12.15% HTML 2.13%

purgecss's Introduction

PurgeCSS

npm npm GitHub Dependabot

PurgeCSS logo

What is PurgeCSS?

When you are building a website, chances are that you are using a css framework like Bootstrap, Materializecss, Foundation, etc... But you will only use a small set of the framework and a lot of unused css styles will be included.

This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your css files. Then it matches the selectors used in your css files with the ones in your content files. It removes unused selectors from your css, resulting in smaller css files.

Sponsors 🥰

Documentation

You can find the PurgeCSS documentation on this website.

Table of Contents

PurgeCSS

Plugins

Guides

Getting Started

Installation

npm install purgecss --save-dev

Usage

import { PurgeCSS } from "purgecss";
const purgeCSSResults = await new PurgeCSS().purge({
  content: ["**/*.html"],
  css: ["**/*.css"],
});

Packages

This repository is a monorepo that we manage using Lerna. That means that we actually publish several packages to npm from the same codebase, including:

Package Version Description
purgecss npm The core of PurgeCSS
postcss-purgecss npm (scoped) PostCSS plugin for PurgeCSS
purgecss-webpack-plugin npm Webpack plugin for PurgeCSS
gulp-purgecss npm Gulp plugin for PurgeCSS
grunt-purgecss npm Grunt plugin for PurgeCSS
rollup-plugin-purgecss npm Rollup plugin for PurgeCSS
purgecss-from-html npm Html extractor for PurgeCSS
purgecss-from-pug npm Pug extractor for PurgeCSS
purgecss-with-wordpress npm Collection of safelist items for WordPress
vue-cli-plugin-purgecss npm Vue CLI Plugin for PurgeCSS

purgecss's People

Contributors

adamwathan avatar ahus1 avatar alexanderopran avatar benjamn avatar coliff avatar davidsneighbour avatar dependabot-preview[bot] avatar dependabot[bot] avatar endlessdev avatar ffloriel avatar gbouteiller avatar greenkeeper[bot] avatar jsnanigans avatar kevinramharak avatar mannil avatar michaelbourne avatar morrislaptop avatar mul14 avatar nauja avatar nelsonreis avatar nicholasshirley avatar oerd avatar pahan35 avatar patrickhill avatar peterholcomb avatar phl3bas avatar rluba avatar subash avatar tanmayrajani avatar vnctaing 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.