mirror of
https://github.com/flextype/flextype.git
synced 2025-08-17 02:24:05 +02:00
chore(admin-plugin): update TailwindExtractor for gulp-purgecss 2.0.6
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
const gulp = require('gulp');
|
||||
const tailwindConfig = "tailwind.config.js";
|
||||
|
||||
/**
|
||||
* Custom PurgeCSS Extractor
|
||||
* https://github.com/FullHuman/purgecss
|
||||
*/
|
||||
class TailwindExtractor {
|
||||
static extract(content) {
|
||||
return content.match(/[\w-/:]+(?<!:)/g) || [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Task: gulp vendor-css
|
||||
*/
|
||||
@@ -75,7 +65,9 @@ gulp.task("admin-panel-css", function() {
|
||||
content: ["../form/templates/**/*.html", "templates/**/*.html"],
|
||||
extractors: [
|
||||
{
|
||||
extractor: TailwindExtractor,
|
||||
extractor: TailwindExtractor = (content) => {
|
||||
return content.match(/[\w-/:]+(?<!:)/g) || [];
|
||||
},
|
||||
extensions: ["html"]
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user