Socket
Socket
Sign inDemoInstall

purgecss

Package Overview
Dependencies
70
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.0 to 0.9.0

flow-typed/index.js

20

package.json
{
"name": "purgecss",
"version": "0.8.0",
"version": "0.9.0",
"description": "Remove unused css selectors.",

@@ -21,3 +21,4 @@ "main": "./lib/purgecss.js",

"lint": "npx eslint -c .eslintrc src/",
"prettier": "npx prettier --write --print-width 100 --tab-width 4 --no-semi --single-quote '{src,__{tests,mocks}__}/**/*.js'"
"prettier":
"npx prettier --write --print-width 100 --tab-width 4 --no-semi --single-quote '{src,__{tests,mocks}__}/**/*.js'"
},

@@ -28,10 +29,3 @@ "repository": {

},
"keywords": [
"optimization",
"unused",
"css",
"purge",
"uncss",
"purify"
],
"keywords": ["optimization", "unused", "css", "purge", "uncss", "purify"],
"author": "Ffloriel",

@@ -56,7 +50,7 @@ "license": "MIT",

"codacy-coverage": "^2.0.3",
"eslint": "^4.9.0",
"eslint": "^4.10.0",
"eslint-plugin-flowtype": "^2.39.1",
"flow-bin": "^0.57.3",
"flow-bin": "^0.58.0",
"jest": "^21.2.1",
"prettier": "^1.7.4",
"prettier": "^1.8.0",
"regenerator-runtime": "^0.11.0",

@@ -63,0 +57,0 @@ "rollup": "^0.50.0",

@@ -1,2 +0,2 @@

import type { Options } from './../../flow-typed/'
// @flow

@@ -3,0 +3,0 @@ const defaultOptions: Options = {

// @flow
import { type ExtractorsObj, type Options } from './../flow/index.js'

@@ -101,3 +100,3 @@ import fs from 'fs'

* Extract the selectors present in the files using a purgecss extractor
* @param {array} files Array of files path or glob pattern
* @param {array} files Array of files path or glob pattern
* @param {array} extractors Array of extractors

@@ -117,3 +116,3 @@ */

const extractor = this.getFileExtractor(file, extractors)
selectors = new Set(...selectors, this.extractSelectors(content, extractor))
selectors = new Set([...selectors, ...this.extractSelectors(content, extractor)])
}

@@ -207,3 +206,3 @@ }

* Check if the node is a css comment to ignore the selector rule
* @param {object} node Node of postcss abstract syntax tree
* @param {object} node Node of postcss abstract syntax tree
*/

@@ -236,3 +235,3 @@ isIgnoreAnnotation(node: Object) {

* @param {Set} selectorsInContent Set of css selectors found in the content files
* @param {Array} selectorsInRule Array of selectors
* @param {Array} selectorsInRule Array of selectors
*/

@@ -239,0 +238,0 @@ shouldKeepSelector(selectorsInContent: Set<string>, selectorsInRule: Array<string>) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc