diff options
author | eric <thul.eric@gmail.com> | 2016-03-13 10:07:58 -0400 |
---|---|---|
committer | eric <thul.eric@gmail.com> | 2016-03-13 10:07:58 -0400 |
commit | 7a70d4eb331b60186e3800d15efd9115462c6a80 (patch) | |
tree | 9af0a5120593adeb47229d6a564fee86ab9f0856 /README.md | |
parent | cfd5d2afba83a0082a3be638a05d1768ee73335e (diff) | |
parent | 1a7a07b7a4fa93a55a600ca9d466020f3e11ab5a (diff) | |
download | purs-loader-7a70d4eb331b60186e3800d15efd9115462c6a80.tar.gz purs-loader-7a70d4eb331b60186e3800d15efd9115462c6a80.tar.zst purs-loader-7a70d4eb331b60186e3800d15efd9115462c6a80.zip |
Merge pull request #44 from ethul/topic/output-only-once
Topic/output only once
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 34 |
1 files changed, 1 insertions, 33 deletions
@@ -14,36 +14,4 @@ npm install purs-loader --save-dev | |||
14 | 14 | ||
15 | ## Example | 15 | ## Example |
16 | 16 | ||
17 | ```js | 17 | Refer to the [purescript-webpack-example](https://github.com/ethul/purescript-webpack-example) for an example. |
18 | // webpack.config.js | ||
19 | 'use strict'; | ||
20 | |||
21 | var PurescriptWebpackPlugin = require('purescript-webpack-plugin'); | ||
22 | |||
23 | var src = ['bower_components/purescript-*/src/**/*.purs', 'src/**/*.purs']; | ||
24 | |||
25 | var ffi = ['bower_components/purescript-*/src/**/*.js', 'src/**/*FFI.js']; | ||
26 | |||
27 | var modulesDirectories = [ | ||
28 | 'node_modules', | ||
29 | 'bower_components' | ||
30 | ]; | ||
31 | |||
32 | var config | ||
33 | = { entry: './src/entry' | ||
34 | , output: { path: __dirname | ||
35 | , pathinfo: true | ||
36 | , filename: 'bundle.js' | ||
37 | } | ||
38 | , module: { loaders: [ { test: /\.purs$/ | ||
39 | , loader: 'purs-loader' | ||
40 | } ] } | ||
41 | , resolve: { modulesDirectories: modulesDirectories } | ||
42 | , plugins: [ new PurescriptWebpackPlugin({src: src, ffi: ffi}) ] | ||
43 | } | ||
44 | ; | ||
45 | |||
46 | module.exports = config; | ||
47 | ``` | ||
48 | |||
49 | See the [example](https://github.com/ethul/purs-loader/tree/master/example) directory for a complete example. | ||