aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PursLoader/Plugin.purs
diff options
context:
space:
mode:
authorAlex Mingoia <talk@alexmingoia.com>2016-05-10 00:09:28 -0700
committerAlex Mingoia <talk@alexmingoia.com>2016-05-10 00:09:28 -0700
commit7de41f10b4ff0f0d6b45d59bee0f166c3cfe3f9f (patch)
tree9ee160ba5b7dab900ccd1cfa657760e4103a175e /src/PursLoader/Plugin.purs
parent777472b3830cb3d2ff3390003ea422c6d4522715 (diff)
downloadpurs-loader-7de41f10b4ff0f0d6b45d59bee0f166c3cfe3f9f.tar.gz
purs-loader-7de41f10b4ff0f0d6b45d59bee0f166c3cfe3f9f.tar.zst
purs-loader-7de41f10b4ff0f0d6b45d59bee0f166c3cfe3f9f.zip
Refactor to compile independently of purescript-webpack-plugin.
- Remove dependence on purescript-webpack-plugin - Fixes double-compilation issue by loading compiled JS instead of adding dependency. - Uses `psc-ide-server` for fast rebuilds.
Diffstat (limited to 'src/PursLoader/Plugin.purs')
-rw-r--r--src/PursLoader/Plugin.purs34
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 @@
1module PursLoader.Plugin
2 ( Compile()
3 , Context()
4 , Options()
5 , DependencyGraph()
6 , dependenciesOf
7 ) where
8
9import Prelude (Unit())
10
11import Control.Monad.Eff (Eff())
12import Control.Monad.Eff.Exception (Error())
13
14import Data.Either (Either(..))
15import Data.Function (Fn4(), runFn4)
16import Data.Nullable (Nullable())
17
18type Compile eff = Nullable Error -> DependencyGraph -> Eff eff Unit
19
20type Context eff = { compile :: Compile eff -> Eff eff Unit, options :: Options }
21
22type Options = { bundle :: Boolean, output :: String, bundleOutput :: String }
23
24dependenciesOf :: DependencyGraph -> String -> Either Error (Array String)
25dependenciesOf = runFn4 dependenciesOfFn Left Right
26
27foreign import data DependencyGraph :: *
28
29foreign 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))