Skip to content

Commit

Permalink
v0.8.0
Browse files Browse the repository at this point in the history
- fix flow errors
- build v0.8.0
  • Loading branch information
Ffloriel committed Oct 23, 2017
1 parent fe25243 commit d1c9172
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type Options = {
css: Array<string>,
extractors?: Array<ExtractorsObj>,
whitelist?: Array<string>,
whitelistPatterns?: Array<string>,
whitelistPatterns?: Array<RegExp>,
output?: string,
stdout?: boolean,
stdin?:boolean,
Expand Down
2 changes: 1 addition & 1 deletion lib/purgecss.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ declare namespace Purgecss {
css: Array<string>,
extractors?: Array<ExtractorsObj>,
whitelist?: Array<string>,
whitelistPatterns?: Array<string>,
whitelistPatterns?: Array<RegExp>,
output?: string,
stdout?: boolean,
stdin?: boolean,
Expand Down
2 changes: 1 addition & 1 deletion lib/purgecss.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/purgecss.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "purgecss",
"version": "0.7.0",
"version": "0.8.0",
"description": "Remove unused css selectors.",
"main": "./lib/purgecss.js",
"module": "./lib/purgecss.es.js",
Expand Down
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,10 @@ class Purgecss {
isSelectorWhitelisted(selector: string): boolean {
return !!(
CSS_WHITELIST.includes(selector) ||
(this.options.whitelist && this.options.whitelist.some(v => v === selector)) ||
(this.options.whitelist &&
this.options.whitelist.some((v: string) => v === selector)) ||
(this.options.whitelistPatterns &&
this.options.whitelistPatterns.some(v => v.test(selector)))
this.options.whitelistPatterns.some((v: RegExp) => v.test(selector)))
)
}
}
Expand Down

0 comments on commit d1c9172

Please sign in to comment.