@pi-r/sass 0.11.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -4
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
const
|
|
2
|
+
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const url = require('node:url');
|
|
4
5
|
function transform(context, value, options) {
|
|
5
6
|
context = options.upgrade(context, __dirname);
|
|
6
|
-
const { sourceFile, sourceName, sourcesRelativeTo, sourceMap } = options;
|
|
7
|
+
const { sourceFile, sourceName, sourcesRelativeTo, sourceMap, metadata } = options;
|
|
7
8
|
const baseConfig = options.toBaseConfig();
|
|
8
9
|
if (baseConfig.sourceMap === false) {
|
|
9
10
|
sourceMap.reset();
|
|
@@ -23,7 +24,7 @@ function transform(context, value, options) {
|
|
|
23
24
|
baseConfig.loadPaths = includePaths;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
|
-
const nodePackage =
|
|
27
|
+
const nodePackage = metadata?.__nodepackageimporter__ || process.env.SASS_OPTIONS_IMPORTER_NODE_PACKAGE || null;
|
|
27
28
|
if (nodePackage && nodePackage !== 'false') {
|
|
28
29
|
(baseConfig.importers ||= []).push(new context.NodePackageImporter(nodePackage === 'true' ? undefined : nodePackage));
|
|
29
30
|
}
|
|
@@ -44,4 +45,5 @@ function transform(context, value, options) {
|
|
|
44
45
|
return result.css;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
48
|
+
|
|
47
49
|
module.exports = transform;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/sass",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Sass transform function for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"sass": "^1.
|
|
22
|
+
"sass": "^1.99.0"
|
|
23
23
|
}
|
|
24
24
|
}
|