diff options
author | eric thul <thul.eric@gmail.com> | 2016-03-08 21:58:55 -0500 |
---|---|---|
committer | eric thul <thul.eric@gmail.com> | 2016-03-08 22:01:40 -0500 |
commit | 87145c4d29e9ab45d04c62d19e8697527728549f (patch) | |
tree | 35bc21658cebc370f2d0aecee13a2188602bfd80 /src/PursLoader/Plugin.purs | |
parent | 17f22f868b851e50081844562627a7a8a414dcaa (diff) | |
download | purs-loader-87145c4d29e9ab45d04c62d19e8697527728549f.tar.gz purs-loader-87145c4d29e9ab45d04c62d19e8697527728549f.tar.zst purs-loader-87145c4d29e9ab45d04c62d19e8697527728549f.zip |
Handle optional bundling by the compiler
Resolves ethul/purescript-webpack-plugin#9
Diffstat (limited to 'src/PursLoader/Plugin.purs')
-rw-r--r-- | src/PursLoader/Plugin.purs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/PursLoader/Plugin.purs b/src/PursLoader/Plugin.purs index 23f8600..520c786 100644 --- a/src/PursLoader/Plugin.purs +++ b/src/PursLoader/Plugin.purs | |||
@@ -2,6 +2,7 @@ module PursLoader.Plugin | |||
2 | ( Result() | 2 | ( Result() |
3 | , Compile() | 3 | , Compile() |
4 | , Context() | 4 | , Context() |
5 | , Options() | ||
5 | , ImmutableMap() | 6 | , ImmutableMap() |
6 | , DependencyGraph() | 7 | , DependencyGraph() |
7 | , get | 8 | , get |
@@ -22,7 +23,9 @@ type Result = { srcMap :: ImmutableMap String String, ffiMap :: ImmutableMap Str | |||
22 | 23 | ||
23 | type Compile eff = Nullable Error -> Result -> Eff eff Unit | 24 | type Compile eff = Nullable Error -> Result -> Eff eff Unit |
24 | 25 | ||
25 | type Context eff = { compile :: Compile eff -> Eff eff Unit } | 26 | type Context eff = { compile :: Compile eff -> Eff eff Unit, options :: Options } |
27 | |||
28 | type Options = { bundle :: Boolean, output :: String, bundleOutput :: String } | ||
26 | 29 | ||
27 | get :: forall key value. ImmutableMap key value -> key -> Maybe value | 30 | get :: forall key value. ImmutableMap key value -> key -> Maybe value |
28 | get = runFn4 getFn Nothing Just | 31 | get = runFn4 getFn Nothing Just |