UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

54 lines (53 loc) 1.12 kB
{ "type": "root", "children": [ { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\timport { getContext } from 'svelte';\n\timport { mapbox, key } from './mapbox.js';\n\n\tconst { getMap } = getContext(key);\n\tconst map = getMap();\n\n\texport let lat;\n\texport let lon;\n\texport let label;\n\n\tconst popup = new mapbox.Popup({ offset: 25 })\n\t\t.setText(label);\n\n\tconst marker = new mapbox.Marker()\n\t\t.setLngLat([lon, lat])\n\t\t.setPopup(popup)\n\t\t.addTo(map);\n", "position": { "start": { "line": 1, "column": 9, "offset": 8 }, "end": { "line": 19, "column": 1, "offset": 370 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 19, "column": 10, "offset": 379 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 19, "column": 10, "offset": 379 } } }