Skip to content

Commit 82cb004

Browse files
committed
import fs
- remove unused variables
1 parent 7f31eb2 commit 82cb004

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

packages/rollup-plugin-purgecss/lib/rollup-plugin-purgecss.es.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createFilter } from 'rollup-pluginutils';
22
import Purgecss from 'purgecss';
3+
import fs from 'fs';
34

45
const 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
}

packages/rollup-plugin-purgecss/lib/rollup-plugin-purgecss.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
44

55
var rollupPluginutils = require('rollup-pluginutils');
66
var Purgecss = _interopDefault(require('purgecss'));
7+
var fs = _interopDefault(require('fs'));
78

89
const 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
}

packages/rollup-plugin-purgecss/rollup.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default {
1919
],
2020
external: [
2121
"purgecss",
22-
"rollup-pluginutils"
22+
"rollup-pluginutils",
23+
"fs"
2324
]
2425
}

packages/rollup-plugin-purgecss/src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createFilter } from 'rollup-pluginutils'
22
import Purgecss from "purgecss"
3+
import fs from "fs"
34

45
const 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
}

0 commit comments

Comments
 (0)