This is no longer supported.
me$ npm i tangram-cartocss
// or
me$ yarn add tangram-cartocss
import CCSS from 'tangram-cartocss';
const Carto = require('carto');
const CartoCSSRenderer = new Carto.RendererJS({
reference: tangramReference,
strict: true
});
const css = `
#layer {
line-dasharray: 2,3
}`;
const layers = CartoCSSRenderer.render(css).getLayers();
console.log('\nlayerToYAML:\n', JSON.stringify(layerToYAML(layers[1], 1), null, 4));
Currently, this doesn't support texts, although Tangram supports it.
There are other limitations, but they are imposed by Tangram and tangram-reference.