Skip to content

Commit 15a8ec4

Browse files
jpraetoriusmoonglum
authored andcommitted
Update exports of module
The plugins interface in faucet-pipeline-core expects a more structured object, where the plugin function is only a part, so using this plugin in its real form currently fails.
1 parent 2e0c2c0 commit 15a8ec4

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

lib/index.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ let { abort } = require("faucet-pipeline-core/lib/util");
22
let path = require("path");
33
let makePostCSS = require("./make-postcss");
44

5-
module.exports = (config, assetManager, { browsers, compact, sourcemaps } = {}) => {
6-
let bundlers = config.map(bundleConfig =>
7-
makeBundler(bundleConfig, assetManager, { browsers, compact, sourcemaps }));
8-
9-
return filepaths => Promise.all(bundlers.map(bundle => bundle(filepaths)));
5+
module.exports = {
6+
key: "css",
7+
bucket: "styles",
8+
plugin: faucetCSS
109
};
1110

11+
function faucetCSS(config, assetManager, { browsers, compact, sourcemaps } = {}) {
12+
let bundlers = config.map(bundleConfig => makeBundler(bundleConfig,
13+
assetManager, { browsers, compact, sourcemaps }));
14+
15+
return filepaths => Promise.all(bundlers.
16+
map(bundler => bundler(filepaths)));
17+
}
18+
1219
function makeBundler(config, assetManager, { browsers, compact, sourcemaps } = {}) {
1320
let { browserslist, fingerprint } = config;
1421

0 commit comments

Comments
 (0)