diff options
author | eric <thul.eric@gmail.com> | 2016-05-21 22:44:27 -0400 |
---|---|---|
committer | eric <thul.eric@gmail.com> | 2016-05-21 22:44:27 -0400 |
commit | d301b47d8fb7139d11f59c5d969bdde6132a8230 (patch) | |
tree | 10a7677d88c750b360f141b2e9d5ca095e01ab4c /src/PursLoader/Plugin.purs | |
parent | 777472b3830cb3d2ff3390003ea422c6d4522715 (diff) | |
parent | 17acb575860cf1bed9e1f6d992a9b7cd66057464 (diff) | |
download | purs-loader-d301b47d8fb7139d11f59c5d969bdde6132a8230.tar.gz purs-loader-d301b47d8fb7139d11f59c5d969bdde6132a8230.tar.zst purs-loader-d301b47d8fb7139d11f59c5d969bdde6132a8230.zip |
Merge pull request #47 from alexmingoia/topic/refactor
Refactor to compile independently of purescript-webpack-plugin.
Diffstat (limited to 'src/PursLoader/Plugin.purs')
-rw-r--r-- | src/PursLoader/Plugin.purs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/PursLoader/Plugin.purs b/src/PursLoader/Plugin.purs deleted file mode 100644 index c798c83..0000000 --- a/src/PursLoader/Plugin.purs +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | module PursLoader.Plugin | ||
2 | ( Compile() | ||
3 | , Context() | ||
4 | , Options() | ||
5 | , DependencyGraph() | ||
6 | , dependenciesOf | ||
7 | ) where | ||
8 | |||
9 | import Prelude (Unit()) | ||
10 | |||
11 | import Control.Monad.Eff (Eff()) | ||
12 | import Control.Monad.Eff.Exception (Error()) | ||
13 | |||
14 | import Data.Either (Either(..)) | ||
15 | import Data.Function (Fn4(), runFn4) | ||
16 | import Data.Nullable (Nullable()) | ||
17 | |||
18 | type Compile eff = Nullable Error -> DependencyGraph -> Eff eff Unit | ||
19 | |||
20 | type Context eff = { compile :: Compile eff -> Eff eff Unit, options :: Options } | ||
21 | |||
22 | type Options = { bundle :: Boolean, output :: String, bundleOutput :: String } | ||
23 | |||
24 | dependenciesOf :: DependencyGraph -> String -> Either Error (Array String) | ||
25 | dependenciesOf = runFn4 dependenciesOfFn Left Right | ||
26 | |||
27 | foreign import data DependencyGraph :: * | ||
28 | |||
29 | foreign import dependenciesOfFn | ||
30 | :: Fn4 (Error -> Either Error (Array String)) | ||
31 | (Array String -> Either Error (Array String)) | ||
32 | DependencyGraph | ||
33 | String | ||
34 | (Either Error (Array String)) | ||