by Ossi Hanhinen, @ohanhi
with the support of Futurice 💚.
Licensed under CC BY 4.0.
Goal: a consistent style throughout all Elm projects that is easy to read and produces clean diffs to make debugging easier. This means valuing regularity and simplicity over cleverness.
Keep it under 80 characters. Going over is not the end of the world, but consider refactoring before you decide a line really must be longer.
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/exec" | |
"os/signal" |
This document is a collection of concepts and strategies to make large Elm projects modular and extensible.
We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp
. You will probably merge
a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
'use strict'; | |
/** | |
* This module monitors angularFire's authentication and performs actions based on authentication state. | |
* directives/directive.ngcloakauth.js depends on this file | |
* | |
* Modify ng-cloak to hide content until FirebaseSimpleLogin resolves. Also | |
* provides ng-show-auth methods for displaying content only when certain login | |
* states are active. | |
* |
grunt.initConfig | |
stylus: | |
options: | |
use: [ | |
() -> require('autoprefixer-stylus')('last 2 versions', 'ie 8') | |
] | |
compile: | |
files: | |
'build/styles.css': 'styles/index.styl' | |