Ast types sourcemap generation

node v10.24.1
version: master
endpointsharetweet
const {builders} = require("ast-types") const recast = require("recast") const node = builders.callExpression(builders.identifier('foo'), []) node.original = Object.create(node) node.original.loc = { start: { line: 10, column: 0 }, end: { line: 10, column: 3 } } const {map, code} = recast.print(node, { sourceMapName: 'map.json' }) console.log(map, code)
Loading…

no comments

    sign in to comment