Skip to content

Instantly share code, notes, and snippets.

@jrrodjr
jrrodjr / sketch_ApplicationActions.txt
Created December 5, 2017 19:17
Unsorted list of application actions from Sketch 47.1
### Derived from (Sketch 47.1)
### log(NSApp.delegate().actionController().allActions());
MSShowOnlineHelpAction
MSRunLastScriptAction
MSNewFromTemplateAction
MSSilentCheckForUpdatesAction
MSFeedbackAction
MSQuietCheckForUpdatesAction
MSOpenCloudPreferencesAction
@jrrodjr
jrrodjr / sketch_DocumentActions.txt
Created December 5, 2017 19:11
Unsorted list of document actions from Sketch 47.1
### Derived from (Sketch v47.1):
### log(context.document.actionsController().allActions());
MSConstraintPinLeftAction
MSAlignMiddleAction
MSToggleBorderAction
MSCurveModeAsymmetricAction
MSRemoveTextTransformAction
MSReduceImageSizeAction
MSInsertImageAction
@jrrodjr
jrrodjr / sketch_addLibraryFileFromPlugin.js
Last active July 21, 2018 09:42
Sketch : Install a file as a library from the plugin resources
function addLibraryFileFromPlugin(context) {
var sketch = context.api();
var libSourceFile = "libraries/myLibrary.sketch"; // The file with the symbols for your library; should located in the plugin's resources folder
var libSourcePath = context.plugin.urlForResourceNamed(libSourceFile).path();
if(libSourcePath) {
var libURL = NSURL.fileURLWithPath(libSourcePath);
var libPaneIdentifier = MSAssetLibrariesPreferencePane.identifier();
var libPane = MSPreferencesController.sharedController().preferencePanes().objectForKey(libPaneIdentifier);