File tree 3 files changed +12
-8
lines changed
3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 26
26
``` html
27
27
<div
28
28
id =" app"
29
- data-source =' "{
29
+ data-source =" {
30
30
" filename " : " root /src /App.vue " ,
31
31
" start " : 0,
32
32
" end " : 14
33
- }"'
33
+ }"
34
34
>
35
35
<img
36
36
alt =" Vue logo"
37
37
src =" ./assets/logo.png"
38
- data-source =' "{
38
+ data-source =" {
39
39
" filename " : " root /src /App.vue " ,
40
40
" start " : 17,
41
41
" end " : 61
42
- }"'
42
+ }"
43
43
/>
44
44
<h1
45
- data-source =' "{
45
+ data-source =" {
46
46
" filename " : " root /src /HelloWorld.vue " ,
47
47
" start " : 22,
48
48
" end " : 26
49
- }"'
49
+ }"
50
50
>
51
51
Welcome to Your Vue.js App
52
52
</h1 >
Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ const generateCompilerModule = () => {
5
5
const { start, end } = node ;
6
6
7
7
const meta = { filename, start, end } ;
8
- const value = `"{\"filename\":\"${ meta . filename } \",\"start\":${ meta . start } ,\"end\":${ meta . end } }"` ;
8
+ const value = JSON . stringify ( {
9
+ filename : meta . filename ,
10
+ start : meta . start ,
11
+ end : meta . end ,
12
+ } ) ;
9
13
10
14
if ( ! node . attrsList ) node . attrsList = [ ] ;
11
15
node . attrsList . push ( { name : 'data-source' , value : value } ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-cli-plugin-source" ,
3
- "version" : " 1.0.0 " ,
3
+ "version" : " 1.0.1 " ,
4
4
"description" : " Add source location to elements" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {},
You can’t perform that action at this time.
0 commit comments