@pi-r/chrome 0.10.0 → 0.10.1
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 +3 -3
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -38,7 +38,7 @@ const REGEXP_TEMPLATECONDITIONAL = /(\n\s+)?\{\{\s*if\s+((?:[^}]|}(?!}))+?)\}\}(
|
|
|
38
38
|
const REGEXP_TEMPLATEELSEIF = /\{\{\s*else if\s+((?:[^}]|}(?!}))+?)\}\}(\s*)((?:.(?!\{\{\s*else if))*)/gs;
|
|
39
39
|
const REGEXP_TEMPLATECOMPARISON = /\s*\(\s*(?:(eq|ne|lt|le|gt|ge)\s+)?("[^"]+"|'[^']+'|[^\s)]+)(?:\s+("[^"]+"|'[^']+'|[^\s)]+))?\s*\)/g;
|
|
40
40
|
const REGEXP_TEMPLATEMATCH = new RegExp(`^(?:(and|or|not)\\s+)?((?:${REGEXP_TEMPLATECOMPARISON.source})+)|(!|not\\s+)?([^\\s][\\S\\s]*)$`);
|
|
41
|
-
const REGEXP_IMPORTMODULE = /(?:(?:^|[\n;]+)\s*import\s+(?:("(?:[^"]|(?<=\\)")+"|'(?:[^']|(?<=\\)')+')|.+?from\s+("(?:[^"]|(?<=\\)")+"|'(?:[^']|(?<=\\)')+')(?:[ \t]+
|
|
41
|
+
const REGEXP_IMPORTMODULE = /(?:(?:^|[\n;]+)\s*import\s+(?:("(?:[^"]|(?<=\\)")+"|'(?:[^']|(?<=\\)')+')|.+?from\s+("(?:[^"]|(?<=\\)")+"|'(?:[^']|(?<=\\)')+')(?:[ \t]+with[ \t]+\{((?:"(?:[^"]|(?<=\\)")+"|'(?:[^']|(?<=\\)')+'|`(?:[^`]|(?<=\\)`)+`|{[^{]*{|{[^}]*}|}[^}]*}|[^"'`]+)+)\})?)|\bimport\(\s*("(?:[^"]|(?<=\\)")+"|'(?:[^']|(?<=\\)')+')\s*(?:,\s*\{((?:"(?:[^"]|(?<=\\)")+"|'(?:[^']|(?<=\\)')+'|`(?:[^`]|(?<=\\)`)+`|{[^{]*{|{[^}]*}|}[^}]*}|[^"'`]+)+)\}\s*)?\))/gd;
|
|
42
42
|
const REGEXP_BLOCKEXCLUDE = new RegExp(`(\\s*)<!--\\s*exclude\\s*:\\s*(?:start|end)\\s*-->` + dom_1.DomWriter.PATTERN_TRAILINGSPACE, 'gi');
|
|
43
43
|
const REGEXP_COMMENT = new RegExp(dom_1.DomWriter.PATTERN_COMMENT, 'g');
|
|
44
44
|
const REGEXP_QUOTEDVALUE = new RegExp(`\\b(?:@import${PATTERN_STRING_MANY}|content${PATTERN_STRING_SOME}:${PATTERN_STRING_SOME})(?:"[^"]*"|'[^']*')`, 'gi');
|
|
@@ -1273,13 +1273,13 @@ class ChromeDocument extends Document {
|
|
|
1273
1273
|
let mainFile, pathname, match;
|
|
1274
1274
|
const ignorePath = bundleMain && (mainFile = this.findSourceRoot(bundleMain.uri)) && (Document.isDir(mainFile) || (mainFile = path.dirname(mainFile))) && mainFile === localFile;
|
|
1275
1275
|
while (match = REGEXP_IMPORTMODULE.exec(output)) {
|
|
1276
|
-
const
|
|
1276
|
+
const type = match[3] || match[5];
|
|
1277
1277
|
const idx = match[1] ? 1 : match[2] ? 2 : 4;
|
|
1278
1278
|
const [a, b] = match.indices[idx];
|
|
1279
1279
|
const from = (0, util_1.trimQuote)(match[idx]);
|
|
1280
1280
|
const quote = output[a];
|
|
1281
1281
|
const relative = /^\.{0,2}\//.test(from);
|
|
1282
|
-
if (
|
|
1282
|
+
if (type && /\btype\s*:\s*(["'`])(?:css|json)\1/.test(type)) {
|
|
1283
1283
|
try {
|
|
1284
1284
|
const asset = host.findAsset(relative ? new URL(from, uri) : from);
|
|
1285
1285
|
if (asset) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/chrome",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Chrome document constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/cloud": "^0.12.
|
|
24
|
-
"@e-mc/core": "^0.12.
|
|
25
|
-
"@e-mc/document": "^0.12.
|
|
26
|
-
"@e-mc/types": "^0.12.
|
|
23
|
+
"@e-mc/cloud": "^0.12.3",
|
|
24
|
+
"@e-mc/core": "^0.12.3",
|
|
25
|
+
"@e-mc/document": "^0.12.3",
|
|
26
|
+
"@e-mc/types": "^0.12.3",
|
|
27
27
|
"image-size": "^2.0.2"
|
|
28
28
|
}
|
|
29
29
|
}
|