Is there a working plugin to export all files in a folder to PNGs? I tried running the code below from the "run custom script" dialog and I couldn't even get it to run for a single file.
I kept getting the error
ReferenceError: Can't find variable: com
line: 12
sourceURL: /Users/username/Library/Containers/com.bohemiancoding.sketch3/Data/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Untitled.sketchplugin
column: 22
if ([doc fileURL] == null) {
alert("You need to save your document to use this command");
} else {
var file_path = com.bomberstudios.getFileFolder(),
export_to_path = [doc askForUserInput:"Export to…" ofType:2 initialValue:file_path];
if (0 === export_to_path.indexOf("file://")) {
export_to_path = export_to_path.substring(7);
}
Is there a working plugin to export all files in a folder to PNGs? I tried running the code below from the "run custom script" dialog and I couldn't even get it to run for a single file.
I kept getting the error ReferenceError: Can't find variable: com line: 12 sourceURL: /Users/username/Library/Containers/com.bohemiancoding.sketch3/Data/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Untitled.sketchplugin column: 22
// Export all artboards in ...
@import 'library/common.js'
var doc = doc || context.document, selection = selection || context.selection
if ([doc fileURL] == null) { alert("You need to save your document to use this command"); } else { var file_path = com.bomberstudios.getFileFolder(), export_to_path = [doc askForUserInput:"Export to…" ofType:2 initialValue:file_path];
if (0 === export_to_path.indexOf("file://")) { export_to_path = export_to_path.substring(7); }
com.bomberstudios.export_all_artboards("png", export_to_path); }