@navita/engine 0.0.7 → 0.0.9
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.d.ts +1 -0
- package/index.js +6 -4
- package/index.mjs +6 -4
- package/package.json +7 -1
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -154,7 +154,8 @@ function printSourceMap(sourceMapReferences, content) {
|
|
|
154
154
|
return content;
|
|
155
155
|
}
|
|
156
156
|
const sourceMap$1 = new sourceMap.SourceMapGenerator({
|
|
157
|
-
file: "navita.css"
|
|
157
|
+
file: "navita.css",
|
|
158
|
+
skipValidation: true
|
|
158
159
|
});
|
|
159
160
|
const references = entries.flatMap(([filePath, references])=>references.map((reference)=>({
|
|
160
161
|
filePath,
|
|
@@ -752,10 +753,11 @@ class Engine {
|
|
|
752
753
|
const { name } = path.parse(filePath);
|
|
753
754
|
const extraClass = this.options.enableDebugIdentifiers ? `${name}_${identifier}` : '';
|
|
754
755
|
const selector = '.' + classList.toString().split(' ').concat(extraClass).filter(Boolean).join('.');
|
|
755
|
-
|
|
756
|
-
|
|
756
|
+
const newFilePath = path.relative(this.options.context || process.cwd(), filePath);
|
|
757
|
+
if (index === 0 || !this.sourceMapReferences[newFilePath]) {
|
|
758
|
+
this.sourceMapReferences[newFilePath] = [];
|
|
757
759
|
}
|
|
758
|
-
this.sourceMapReferences[
|
|
760
|
+
this.sourceMapReferences[newFilePath][index] = {
|
|
759
761
|
selector,
|
|
760
762
|
line,
|
|
761
763
|
column
|
package/index.mjs
CHANGED
|
@@ -152,7 +152,8 @@ function printSourceMap(sourceMapReferences, content) {
|
|
|
152
152
|
return content;
|
|
153
153
|
}
|
|
154
154
|
const sourceMap = new SourceMapGenerator({
|
|
155
|
-
file: "navita.css"
|
|
155
|
+
file: "navita.css",
|
|
156
|
+
skipValidation: true
|
|
156
157
|
});
|
|
157
158
|
const references = entries.flatMap(([filePath, references])=>references.map((reference)=>({
|
|
158
159
|
filePath,
|
|
@@ -750,10 +751,11 @@ class Engine {
|
|
|
750
751
|
const { name } = path.parse(filePath);
|
|
751
752
|
const extraClass = this.options.enableDebugIdentifiers ? `${name}_${identifier}` : '';
|
|
752
753
|
const selector = '.' + classList.toString().split(' ').concat(extraClass).filter(Boolean).join('.');
|
|
753
|
-
|
|
754
|
-
|
|
754
|
+
const newFilePath = path.relative(this.options.context || process.cwd(), filePath);
|
|
755
|
+
if (index === 0 || !this.sourceMapReferences[newFilePath]) {
|
|
756
|
+
this.sourceMapReferences[newFilePath] = [];
|
|
755
757
|
}
|
|
756
|
-
this.sourceMapReferences[
|
|
758
|
+
this.sourceMapReferences[newFilePath][index] = {
|
|
757
759
|
selector,
|
|
758
760
|
line,
|
|
759
761
|
column
|
package/package.json
CHANGED