@vue/language-plugin-pug 1.9.0-alpha.3 → 2.0.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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const pug = require("volar-service-pug/
|
|
2
|
+
const pug = require("volar-service-pug/lib/languageService");
|
|
3
3
|
const source_map_1 = require("@volar/source-map");
|
|
4
4
|
const plugin = ({ modules }) => {
|
|
5
5
|
return {
|
|
6
6
|
name: require('../package.json').name,
|
|
7
|
-
version:
|
|
7
|
+
version: 2,
|
|
8
8
|
compileSFCTemplate(lang, template, options) {
|
|
9
9
|
if (lang === 'pug') {
|
|
10
10
|
const pugFile = pug?.baseParse(template);
|
|
@@ -27,7 +27,7 @@ const plugin = ({ modules }) => {
|
|
|
27
27
|
get(target, prop) {
|
|
28
28
|
if (prop === 'offset') {
|
|
29
29
|
const htmlOffset = target.offset;
|
|
30
|
-
for (const mapped of map.
|
|
30
|
+
for (const mapped of map.getSourceOffsets(htmlOffset)) {
|
|
31
31
|
return mapped[0];
|
|
32
32
|
}
|
|
33
33
|
return -1;
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-plugin-pug",
|
|
3
|
-
"version": "
|
|
4
|
-
"main": "out/index.js",
|
|
3
|
+
"version": "2.0.1",
|
|
5
4
|
"license": "MIT",
|
|
6
5
|
"files": [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
6
|
+
"**/*.js",
|
|
7
|
+
"**/*.d.ts"
|
|
9
8
|
],
|
|
10
9
|
"repository": {
|
|
11
10
|
"type": "git",
|
|
@@ -14,11 +13,11 @@
|
|
|
14
13
|
},
|
|
15
14
|
"devDependencies": {
|
|
16
15
|
"@types/node": "latest",
|
|
17
|
-
"@vue/language-core": "
|
|
16
|
+
"@vue/language-core": "2.0.1"
|
|
18
17
|
},
|
|
19
18
|
"dependencies": {
|
|
20
|
-
"@volar/source-map": "~1.
|
|
21
|
-
"volar-service-pug": "0.0.
|
|
19
|
+
"@volar/source-map": "~2.1.0",
|
|
20
|
+
"volar-service-pug": "0.0.31"
|
|
22
21
|
},
|
|
23
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "adedfd0983c910370d080e955702cca7d2275420"
|
|
24
23
|
}
|