elm-workshop

An introductory Elm workshop. Video available on Frontend Masters!

  • 所有者: rtfeldman/elm-workshop
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

This work is licensed under a Creative Commons Attribution 4.0 International License. Enjoy!

Getting Started

Installation

  1. Install Node.js 6.9.2 or higher

  2. Add a plugin for your editor of choice: Atom, Sublime Text, VS Code, Light Table, Vim, Emacs, Brackets

  3. Not required, but highly recommended: enable "elm-format on save" in your editor.

  4. Run the following command to install everything else:

npm install -g elm elm-test elm-css elm-live@2.6.1 elm-format@exp

Note to macOS users: If step 4 gives you an EACCESS error, try this fix:

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

Then re-run step 4.

Clone this repository

Run this at the terminal:

git clone https://github.com/rtfeldman/elm-workshop.git
cd elm-workshop

Note: Tab characters are syntax errors in Elm code, so if your editor uses them for indentation, definitely switch it to spaces for this workshop!

Create a GitHub Personal Access Token

We'll be using GitHub's Search API, and authenticated API access lets us experiment without worrying about the default rate limit. Since we'll only be accessing the Search API, these steps can be done either on your personal GitHub account or on a throwaway account created for this workshop; either way will work just as well.

  1. Visit https://github.com/settings/tokens/new
  2. Enter "Elm Workshop" under "Token description" and leave everything else blank.
  3. Create the token and copy it into a new file called Auth.elm:

Auth.elm

module Auth exposing (token)


token =
    -- Your token should go here instead of this sample token:
    "abcdef1234567890abcdef1234567890abcdef12"

Note: Even for a token that has no permissions, good security habits are
still important! Auth.elm is in .gitignore to avoid accidentally checking in
an API secret, and you should delete this token when the workshop is over.

Verify Setup

Run this to install packages:

elm-package install --yes

Once that succeeds, run this to verify everything:

elm-live Main.elm --open --output=elm.js

A browser should open, and you should see this in it:

If things aren't working, the instructor will be happy to help!

Start with Part 1

Run this at the terminal:

cd part1

Now head over to the README for Part 1!

主要指標

概覽
名稱與所有者rtfeldman/elm-workshop
主編程語言Elm
編程語言Elm (語言數: 5)
平台
許可證Other
所有者活动
創建於2016-03-04 08:28:29
推送於2018-04-04 07:36:46
最后一次提交2018-04-04 03:36:41
發布數0
用户参与
星數444
關注者數23
派生數167
提交數276
已啟用問題?
問題數10
打開的問題數5
拉請求數7
打開的拉請求數4
關閉的拉請求數6
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?