Loading...
Loading...
Compare original and translation side by side
run_codeget_selection_as_imagerun_codeget_selection_as_imagehttp://localhost:31126/mcpget_selection_as_imagehttp://localhost:31126/mcpget_selection_as_imagehttps://sketch.com/s/<document-share-uuid>/f/<canvas-frame-uuid>/f/<canvas-frame-uuid>run_coderun_codefindconst sketch = require('sketch')
const frameId = '4A2E31FF-56BD-4C29-92D2-829548D19C1D'
const frame = find(`#${frameId}`)
if (frame) sketch.getSelectedDocument().selectedLayers = [frame]https://sketch.com/s/<document-share-uuid>/f/<canvas-frame-uuid>/f/<canvas-frame-uuid>run_coderun_codefindconst sketch = require('sketch')
const frameId = '4A2E31FF-56BD-4C29-92D2-829548D19C1D'
const frame = find(`#${frameId}`)
if (frame) sketch.getSelectedDocument().selectedLayers = [frame]run_coderun_coderun_codeconst sketch = require('sketch')titlerun_coderun_codeconst sketch = require('sketch')run_codetitleget_selection_as_imageget_selection_as_imageget_selection_as_imageget_selection_as_imagerun_coderun_codesketch.exportoutputfilenameconst sketch=require('sketch');const d=sketch.getSelectedDocument()
const l=d.selectedLayers.layers[0]
sketch.export(l,{
output:'/tmp/sketch-assets',
filename:`${l.id}.png`,
formats:['png']
});console.log('ok')sketch.exportoutputfilenameconst sketch=require('sketch');const d=sketch.getSelectedDocument()
const l=d.selectedLayers.layers[0]
sketch.export(l,{
output:'/tmp/sketch-assets',
filename:`${l.id}.png`,
formats:['png']
});console.log('ok')run_coderun_codeEmpty selectionget_selection_as_imageget_selection_as_imageNo documentrun_coderun_codeoutputfilenameoutputfilenamerun_coderun_code