aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md57
1 files changed, 57 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..17fe735
--- /dev/null
+++ b/README.md
@@ -0,0 +1,57 @@
1# purs-loader
2
3> [PureScript](http://www.purescript.org) loader for [webpack](https://github.com/webpack/webpack)
4
5## Install
6
7Install with [npm](https://npmjs.org/package/purs-loader)
8
9```
10npm install purs-loader --save-dev
11```
12
13## Options
14
15#### options
16
17 - **no-prelude**: Boolean value that toggles `--no-prelude`
18 - Do not include the Prelude in the generated Javascript.
19 - **no-opts**: Boolean value that toggles `--no-opts`
20 - Disable all optimizations.
21 - **no-magic-do**: Boolean value that toggles `--no-magic-do`
22 - Turn off optimizations which inline calls to >>= for the Eff monad.
23 - **no-tco**: Boolean value that toggles `--no-tco`
24 - Turn off tail-call elimination.
25 - **runtime-type-checks**: Boolean value that toggles `--runtime-type-checks`
26 - Generate simple runtime type checks for function arguments with simple types.
27 - **verbose-errors**: Boolean value that toggles `--verbose-errors`
28 - Generate verbose error messages.
29 - **output**: String value that sets `--output=<string>`
30 - Write the generated Javascript to the specified file.
31
32## Example
33
34```js
35var path = require('path');
36
37module.exports = {
38 entry: './src/test',
39 output: {
40 path: path.join(__dirname, 'dist'),
41 filename: 'app.js'
42 },
43 module: {
44 loaders: [{
45 test: /\.purs$/,
46 loader: 'purs-loader?no-prelude&output=output'
47 }]
48 },
49 resolve: {
50 modulesDirectories: [
51 'node_modules',
52 'web_modules',
53 'output'
54 ]
55 }
56};
57```