UNPKG

625 BJavaScriptView Raw
1"use strict";
2const toolbox_1 = require("node-sass-magic-importer/dist/toolbox");
3module.exports = function globImporter() {
4 return function importer(url, prev) {
5 const nodeSassOptions = this.options;
6 const includePaths = toolbox_1.buildIncludePaths(nodeSassOptions.includePaths, prev);
7 const filePaths = toolbox_1.resolveGlobUrl(url, includePaths);
8 if (filePaths) {
9 const contents = filePaths
10 .map((x) => `@import '${x}';`)
11 .join(`\n`);
12 return { contents };
13 }
14 return null;
15 };
16};
17//# sourceMappingURL=index.js.map
\No newline at end of file