Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI option for custom entrypoint module #16

Conversation

jivagoalves
Copy link

Sometimes we want to use a different module than Main. For instance, we
may want to use a MainSpec module to run specs against our code base
with something like elm-spec.

module MainSpec where

import IO.IO exposing (..)
import IO.Runner exposing (Request, Response, run)

import Spec.Runner.Console as Console
import Spec exposing (..)

import CSVSpec

allSpecs =
    describe "App"
      [ CSVSpec.spec
      ]

testRunner : IO ()
testRunner = Console.run allSpecs

port requests : Signal Request
port requests = run responses testRunner

port responses : Signal Response

Sometimes we want to use a different module than `Main`. For instance, we
may want to use a `MainSpec` module to run specs against our code base
with something like [elm-spec](https://github.com/avh4/elm-spec).

```elm
module MainSpec where

import IO.IO exposing (..)
import IO.Runner exposing (Request, Response, run)

import Spec.Runner.Console as Console
import Spec exposing (..)

import CSVSpec

allSpecs =
    describe "App"
      [ CSVSpec.spec
      ]

testRunner : IO ()
testRunner = Console.run allSpecs

port requests : Signal Request
port requests = run responses testRunner

port responses : Signal Response
```
@jivagoalves jivagoalves force-pushed the ja_add_cli_option_for_custom_entrypoint_module branch from 44cdac3 to 2bcfb4d Compare October 5, 2015 19:25
@jivagoalves
Copy link
Author

Closing in favor of laszlopandy#2

@jivagoalves jivagoalves closed this Oct 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant