2017 © Pedro Peláez
 

project purge

Command line CSS purging utility

image

katten/purge

Command line CSS purging utility

  • Friday, July 17, 2015
  • by FrancisBaileyH
  • Repository
  • 2 Watchers
  • 2 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Scrutinizer Code Quality Code Coverage Build Status, (*1)

Purge

A command line application to find and flag potentially unused CSS from your site. (Currently a work in progress)., (*2)

Usage

Installation

Download Purge and extract to a location of your choosing. Navigate into Purge's root directory and run, (*3)

composer install 

Running Purge

Change into the src directory of Purge and run it with the following command, (*4)

``` bash php purge.php purge:run , (*5)


For a list of other commands run ``` bash php purge.php purge:run --help

To-Do

  • [ ] Support usage of sitemap.xml for HTML files
  • [ ] Support multiple CSS and HTML files
  • [ ] Pull HTML files directly from framework routes (Symfony, Laravel, etc)
  • [ ] Flag duplicated or overwritten CSS rules
  • [ ] Ability to ignore specificed CSS selectors

Resources

  • Thanks to sabberworm for the wonderful PHP CSS Parsing library
  • Thanks to symfony for their Console, DomCrawler and CssSelector components

Misc

To run unit tests, ensure phpunit is installed and navigate to the root directory of Purge. Run the following command: bash phpunit --bootstrap vendor/autoload.php tests/, (*6)

License

The MIT License (MIT), (*7)

Copyright (c) 2015 Francis Bailey, (*8)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*9)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*10)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*11)

The Versions

17/07 2015

dev-master

9999999-dev

Command line CSS purging utility

  Sources   Download

MIT

The Requires

 

17/07 2015
12/07 2015