How to use the @brainly/html-sketchapp/asketch2sketch/asketch2sketch function in @brainly/html-sketchapp

To help you get started, we’ve selected a few @brainly/html-sketchapp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github KimDal-hyeong / html-to-sketch-electron / plugin / run.js View on Github external
export default function run(context) {
  const url = NSURL.URLWithString('file://' + context.jsonPath.replace(' ', '%20'));
  const data = NSData.dataWithContentsOfURL(url);
  const content = NSString.alloc().initWithData_encoding_(data, NSUTF8StringEncoding);
  asketch2sketch(context, [JSON.parse(content)]);
}