## Options
-###### `pscBundle` (String)
+###### `bundleOutput` (String)
Relative path to the bundled JavaScript file generated by the `PurescriptWebpackPlugin`. The default value is `output/bundle.js`.
resourceDir = dirname (resourcePath ref)
- modulePath = (\opts -> relative resourceDir opts.pscBundle) <$> options
+ modulePath = (\opts -> relative resourceDir opts.bundleOutput) <$> options
result = (\path name -> "module.exports = require('" ++ path ++ "')['" ++ name ++ "'];") <$> modulePath <*> moduleName
import PursLoader.Path (joinPath)
-newtype Options = Options { pscBundle :: String }
+newtype Options = Options { bundleOutput :: String }
-type Options_ = { pscBundle :: String }
+type Options_ = { bundleOutput :: String }
runOptions :: Options -> Options_
runOptions (Options options) = options
instance isForeignOptions :: IsForeign Options where
read obj =
- Options <$> ({ pscBundle: _ }
- <$> (maybe pscBundleDefault id <<< runNullOrUndefined <$> readProp pscBundle obj))
+ Options <$> ({ bundleOutput: _ }
+ <$> (maybe bundleOutputDefault id <<< runNullOrUndefined <$> readProp bundleOutput obj))
where
- pscBundle :: String
- pscBundle = "pscBundle"
+ bundleOutput :: String
+ bundleOutput = "bundleOutput"
- pscBundleDefault :: String
- pscBundleDefault = joinPath "output" "bundle.js"
+ bundleOutputDefault :: String
+ bundleOutputDefault = joinPath "output" "bundle.js"