We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80c8e3a commit 1552eabCopy full SHA for 1552eab
lib/plugin.js
@@ -0,0 +1,16 @@
1
+const transformVars = require('./transformVars');
2
+
3
+/*
4
+ * Define factory to create plugins that convert SASS variables to JS object
5
+ *
6
+ * @param {object} [opts] Options to pass to the `transformVars` method
7
8
+ * @return {SassExtractPluginInstance}
9
+ */
10
+const sassExtractJs = opts => ({
11
+ run: () => ({
12
+ postExtract: extractedVariables => transformVars(extractedVariables.global, opts),
13
+ }),
14
+});
15
16
+module.exports = sassExtractJs;
0 commit comments