artifact-app 0.6.3

Artifact is a design doc tool made for developers. It allows anyone to easily write and link their design docs both to each other and to source code, making it easy to track how complete their project is. Documents are revision controllable, can be rendered as a static web page and have a full suite of command line tools for searching, formatting and displaying them.
Documentation
module Main exposing (..)

import Navigation
--import Html exposing (program)
import Messages exposing (AppMsg(..), Route)
import Models exposing (Model, initialErrors, initialSettings, initialState)
import View exposing (view)
import Update exposing (update)
import Routing
import Artifacts.Commands exposing (fetchAll, artifactsFromStrUnsafe)

type alias Flags =
  { addr: String
  }

initialModel : Navigation.Location -> String -> Route -> Model
initialModel location addr route =
  -- slightly hacky, but this is how we inject the artifacts-json into
  -- the static webpage -- we just replace REPLACE_WITH_ARTIFACTS with
  -- the raw json string (with proper escapes)
  { artifacts = artifactsFromStrUnsafe "REPLACE_WITH_ARTIFACTS"
  , route = route
  , location = location
  , errors = initialErrors
  , settings = initialSettings
  , addr = addr
  , state = initialState
  }

init : Navigation.Location -> (Model, Cmd AppMsg)
init location =
    let

      model = initialModel location "fake-addr" <| Routing.router location
    in
      ( model, Cmd.none )

subscriptions : Model -> Sub AppMsg
subscriptions model =
  Sub.none

-- MAIN

main : Program Never Model AppMsg
main =
    Navigation.program Routing.routerMsg
      { init = init
      , view = view
      , update = update
      , subscriptions = subscriptions
      }