Coder Social home page Coder Social logo

jacob414 / elm-workshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rtfeldman/elm-workshop

0.0 2.0 0.0 367 KB

An introductory Elm workshop.

License: BSD 3-Clause "New" or "Revised" License

Elm 87.92% HTML 2.81% JavaScript 0.15% CSS 9.08% Makefile 0.04%

elm-workshop's Introduction

Getting Started

Installation

  1. Install Node.js 4.0.0 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: install elm-format and integrate it into your editor so that it runs on save. You want the one for Elm 0.17.

  4. Run the following command to install everything else:

npm install -g elm elm-test elm-css [email protected]

Note to Windows 10 users running Bash: There is a bug in Windows Bash which will mess up the installers. This does not affect the normal Windows terminal, so if you use it instead of Windows Bash, you should be fine!

Note to OS X users: If step 4 gives you an EACCESS error on OS X, 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 accessesing 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 --pushstate --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!

elm-workshop's People

Contributors

jacob414 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.