npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

elm-sketch-importer

v0.0.3

Published

An Elm importer from Sketch

Downloads

10

Readme

elm-sketch-importer

Takes a Sketch file, and generates Elm out of it. This is particularly useful if you want to quickly export some part of a design into Elm.

This is a work in progress. PRs are welcome!

Installation

We use elm-format in order to format the output correctly. It is recommeneded that you have this installed globally, via

npm install -g elm-format

Installing the elm-sketch-importer itself is pretty easy.

npm install -g elm-sketch-importer

Usage

Usage: [sketchfile]

Options:
  -h, --help         Show help                                         [boolean]
  -o, --output       Configure the output directory for generated Elm
                                                          [default: "generated"]
  --ef, --elmformat  Specify the location of the elm-format binary
                                                         [default: "elm-format"]

Examples:
  elm-sketch-importer ~/Documents/example.sketch

Support

Layers

Shapes and rects

| Feature | Supported? | |---------|-------------| | Rectangles | :white_check_mark: | | Layer positions | :white_check_mark: | | Layer sizes | :white_check_mark: | | Multiple layers | :white_check_mark: | | Fills | :white_check_mark: | | Border | :warning: | | Border color | :warning: | | Colored fills | :white_check_mark: | | Other shapes | :warning: | | Groups | :warning: | | Slices | :warning: | | Images | :white_check_mark: |

Text

Right now, long text is not correctly exported. This is down to the fact that BPLists are a little difficult to parse in Elm. Support will be coming soon, once I've finished the parser!

| Feature | Supported? | |---------|------------| | Short text | :white_check_mark: | | Long text | :warning: | | Horizional/vertical flips | :white_check_mark: | | Position | :white_check_mark: | | Size | :warning: | | Color | :warning: | | Font | :warning: |

Roadmap

This roadmap intends to be a rough priority list. No dates nor time are fixed -- but the more PRs to help, the faster things get done :)

Before 1.0

  • Relative layout instead of fixed pixels
  • Full support for importing Sketch files
    • Make sure that no features remain unsupported

After 1.0

  • Export views to Sketch

Misc

  • Generating elm-css or style-element based views