diff options
author | eric thul <thul.eric@gmail.com> | 2014-09-21 12:50:12 -0400 |
---|---|---|
committer | eric thul <thul.eric@gmail.com> | 2014-09-22 23:43:29 -0400 |
commit | a42f24b85a304e128c45003b806cc5c4d551b3af (patch) | |
tree | dcd945d01681a2f934f257ca0ba7088ce28f12e4 /README.md | |
parent | 542ab6f00d143b58345672918f831e14f40f8c25 (diff) | |
download | purs-loader-a42f24b85a304e128c45003b806cc5c4d551b3af.tar.gz purs-loader-a42f24b85a304e128c45003b806cc5c4d551b3af.tar.zst purs-loader-a42f24b85a304e128c45003b806cc5c4d551b3af.zip |
Implementation of the loader
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 57 |
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 | |||
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 | #### 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 | ||
35 | var path = require('path'); | ||
36 | |||
37 | module.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 | ``` | ||