Skip to content

Commit

Permalink
fix: readme example updates for new syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll authored Feb 1, 2020
1 parent e26316f commit 5396f27
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ Before diving into the individual attributes, here are the default settings of t
whitelist: ['body', 'html', 'nuxt-progress'],
extractors: [
{
extractor: class {
static extract(content) {
return content.match(/[A-z0-9-:\\/]+/g)
}
extractor(content) {
return content.match(/[A-z0-9-:\\/]+/g)
},
extensions: ['html', 'vue', 'js']
}
Expand Down Expand Up @@ -198,18 +196,14 @@ export default {
purgeCSS: {
extractors: () => [
{
extractor: class {
static extract(content) {
return content.match(/[A-z0-9-:\\/]+/g)
}
extractor: (content) {
return content.match(/[A-z0-9-:\\/]+/g)
},
extensions: ['html', 'vue', 'js']
},
{
extractor: class {
static extract(content) {
return content.match(/[A-z0-9-\\/]+/g)
}
extractor(content) {
return content.match(/[A-z0-9-\\/]+/g)
},
extensions: ['vue'] // This will not work, because the above extractor is applied to 'vue' already.
}
Expand Down

0 comments on commit 5396f27

Please sign in to comment.