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