Elm

Elmコードスクリーンショット生成

Elmのスニペットを、Macから離れることなく共有したくなる画像に。

Elm's type annotations sit on their own line above each function, which gives snippets a distinctive shape that reads well in a frame.

Codeshotは貼り付けたコードからElmを判別するので、言語の選び間違いは起きません。付属する30種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。

module Snapshot exposing (export)

type alias Options =
    { theme : String
    , scale : Int
    }

export : String -> Options -> Result String String
export code options =
    code |> render options.theme |> save options.scale
Atom One · ダーク
module Snapshot exposing (export)

type alias Options =
    { theme : String
    , scale : Int
    }

export : String -> Options -> Result String String
export code options =
    code |> render options.theme |> save options.scale
GitHub · ダーク
module Snapshot exposing (export)

type alias Options =
    { theme : String
    , scale : Int
    }

export : String -> Options -> Result String String
export code options =
    code |> render options.theme |> save options.scale
Solarized · ダーク

Elmに合うテーマ選び

Keep the annotation with its function. Splitting them across a crop removes the most informative line in the snippet.

サイズを正しく決める

画像サイズを内容に合わせるか、比率で固定します(1:1、4:3、3:2、16:9、9:16、2:3、3:4)。そのうえで1×・2×・3×から選んで書き出せば、Retinaディスプレイでも鮮明なままです。Cでクリップボードに直接コピー、またはSで保存できます。

30種類のテーマを見比べるか、全体の流れをご覧ください。

Elmと、ほかの59言語のために

すべてMac上で動作します。コードが外に出ることはありません。

macOS版をダウンロード