aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PursLoader/Plugin.purs
diff options
context:
space:
mode:
authoreric thul <thul.eric@gmail.com>2016-03-08 21:58:55 -0500
committereric thul <thul.eric@gmail.com>2016-03-08 22:01:40 -0500
commit87145c4d29e9ab45d04c62d19e8697527728549f (patch)
tree35bc21658cebc370f2d0aecee13a2188602bfd80 /src/PursLoader/Plugin.purs
parent17f22f868b851e50081844562627a7a8a414dcaa (diff)
downloadpurs-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.purs5
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
23type Compile eff = Nullable Error -> Result -> Eff eff Unit 24type Compile eff = Nullable Error -> Result -> Eff eff Unit
24 25
25type Context eff = { compile :: Compile eff -> Eff eff Unit } 26type Context eff = { compile :: Compile eff -> Eff eff Unit, options :: Options }
27
28type Options = { bundle :: Boolean, output :: String, bundleOutput :: String }
26 29
27get :: forall key value. ImmutableMap key value -> key -> Maybe value 30get :: forall key value. ImmutableMap key value -> key -> Maybe value
28get = runFn4 getFn Nothing Just 31get = runFn4 getFn Nothing Just