File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
packages/rollup-plugin-purgecss Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 11import { createFilter } from 'rollup-pluginutils' ;
22import Purgecss from 'purgecss' ;
3+ import fs from 'fs' ;
34
45const pluginPurgecss = function ( options = { } ) {
56 const filter = createFilter ( options . include || [ '**/*.css' ] , options . exclude || 'node_modules/**' ) ;
@@ -33,7 +34,7 @@ const pluginPurgecss = function (options = {}) {
3334 map : { mappings : '' }
3435 } ;
3536 } ,
36- ongenerate ( opts , result ) {
37+ ongenerate ( ) {
3738 if ( ! options . insert && ( ! styles . length || options . output === false ) ) {
3839 return ;
3940 }
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
44
55var rollupPluginutils = require ( 'rollup-pluginutils' ) ;
66var Purgecss = _interopDefault ( require ( 'purgecss' ) ) ;
7+ var fs = _interopDefault ( require ( 'fs' ) ) ;
78
89const pluginPurgecss = function ( options = { } ) {
910 const filter = rollupPluginutils . createFilter ( options . include || [ '**/*.css' ] , options . exclude || 'node_modules/**' ) ;
@@ -37,7 +38,7 @@ const pluginPurgecss = function (options = {}) {
3738 map : { mappings : '' }
3839 } ;
3940 } ,
40- ongenerate ( opts , result ) {
41+ ongenerate ( ) {
4142 if ( ! options . insert && ( ! styles . length || options . output === false ) ) {
4243 return ;
4344 }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export default {
1919 ] ,
2020 external : [
2121 "purgecss" ,
22- "rollup-pluginutils"
22+ "rollup-pluginutils" ,
23+ "fs"
2324 ]
2425}
Original file line number Diff line number Diff line change 11import { createFilter } from 'rollup-pluginutils'
22import Purgecss from "purgecss"
3+ import fs from "fs"
34
45const pluginPurgecss = function ( options = { } ) {
56 const filter = createFilter ( options . include || [ '**/*.css' ] , options . exclude || 'node_modules/**' )
@@ -33,7 +34,7 @@ const pluginPurgecss = function( options = {} ) {
3334 map : { mappings : '' }
3435 }
3536 } ,
36- ongenerate ( opts , result ) {
37+ ongenerate ( ) {
3738 if ( ! options . insert && ( ! styles . length || options . output === false ) ) {
3839 return
3940 }
You can’t perform that action at this time.
0 commit comments