Skip to content

Allow sketches to import other sketches #5

Description

@fdb

As a user I want to bring in other sketches in my sketches so I can re-use existing work/

As an example, you could create a "fake title" generator that could be used in a "fake news website" generator. Imagine we have a fake title generator saved as sketch -L41HTgXT1z6Vaxno2eR. This is how we could import it:

%import "-L41HTgXT1z6Vaxno2eR" as headline

root:
- <html><body><h1>Fake Gazette</h1>{{ article * 10 }}</body></html>

article:
- <article><h1>{{ headline }}</h1><a href="#">Read More...</a></article>

Because sketch URLs are immutable there are no version conflicts (although it makes it harder to upgrade them with new features).

This depends on #4 (preamble syntax).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions