Created
January 1, 2016 12:24
-
-
Save koenbok/0d8cbc395f8acfb8e4e0 to your computer and use it in GitHub Desktop.
Sketch Plugin Error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SyntaxError: Invalid flag supplied to RegExp constructor. | |
| line: 5 | |
| sourceURL: /Users/koen/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Untitled.sketchplugin | |
| column: 26 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| path = NSProcessInfo.processInfo().arguments()[0] | |
| path = path.stringByDeletingLastPathComponent() | |
| pluginPath = path + "/test.js" | |
| pluginUrl = NSURL.fileURLWithPath(pluginPath) | |
| sketch = [COScript app:"Sketch Beta"] | |
| // sketch.delegate().runPluginScript(pluginPath) | |
| // sketch.delegate().runPluginScript_name(pluginPath, "Framer") | |
| sketch.delegate().evaluateScript("print(hello)") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print("Hello") |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Whatever I do, I can't get a plugin to run from the terminal. I've tried pretty much every method on the app delegate but I always get some regex error back.