ccgus/CocoaScript — pull request #21 by randomsequence (2014-12-19 16:09:46+00:00)
Title: Add support for recursive imports, absolute paths

Sketch.app previously used its own script import syntax (`#import`). We're now switching to CocoaScript's native `@import` syntax.

This PR adds support we previously enjoyed for:

* Absolute script paths (`/path/to/script`)
* Script paths relative to home folder (`~/path/to/script`)
* Nested imports, with a guard against circular / recursive imports

There's also a bug in the current implementation which ignores the first line of an imported script. I've addressed that too. Let me know if you would rather split this into multiple PRs.