diff --git a/Yesod/PureScript.hs b/Yesod/PureScript.hs
--- a/Yesod/PureScript.hs
+++ b/Yesod/PureScript.hs
@@ -19,7 +19,8 @@
     addPureScriptWidget,
     createYesodPureScriptSite,
     defaultYesodPureScriptOptions,
-    getPureScriptRoute
+    getPureScriptRoute,
+    yesodPureScript
  )
 where
 
@@ -49,6 +50,7 @@
                   , TypedContent (TypedContent)
                   , Yesod
                   , YesodSubDispatch
+                  , addScript
                   , getYesod
                   , mkYesodSubDispatch
                   , shamlet
@@ -484,4 +486,16 @@
             Right _js -> return _js
     let thLit = litE $ stringL $ T.unpack compiled -- this is string literal we can insert at TH call site
     [|toWidget $ toJavascript $ rawJS $ T.pack $(thLit)|]
+
+
+-- | Either add link to dynamically compiled PureScript or return statically compiled PureScript.
+-- yesodPureScript :: Bool -> Route -> YesodPureScriptOptions -> Text -> Q Exp
+yesodPureScript dev routeName ypso moduleName =
+        if dev then
+            [|addScript $ $(conE routeName) $ getPureScriptRoute $ map T.pack [$(thModuleNameStrLit)]|]
+        else
+            addPureScriptWidget ypso moduleName
+    where
+        thModuleNameStrLit = litE $ stringL $ T.unpack moduleName
+
 
diff --git a/yesod-purescript.cabal b/yesod-purescript.cabal
--- a/yesod-purescript.cabal
+++ b/yesod-purescript.cabal
@@ -1,5 +1,5 @@
 name:                yesod-purescript
-version:             0.0.4.4
+version:             0.0.4.5
 synopsis:            PureScript integration for Yesod
 description:         PureScript is an awesome statically typed language that compiles to JS and runs in your browser, and this module makes it easier to use PureScript in Yesod.
 homepage:            https://github.com/mpietrzak/yesod-purescript
@@ -24,12 +24,9 @@
                  , bytestring
                  , containers
                  , data-default
-                 , directory
-                 , filepath
                  , formatting
                  , fsnotify
-                 , parsec
-                 , purescript >= 0.6.4 && < 0.6.6
+                 , purescript >= 0.6.4 && < 0.6.7
                  , regex-tdfa
                  , regex-tdfa-text
                  , shakespeare >= 2
