aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--README.md34
-rw-r--r--example/README.md6
-rw-r--r--example/bower.json7
-rw-r--r--example/package.json18
-rw-r--r--example/src/Bar.purs3
-rw-r--r--example/src/Foo.purs15
-rw-r--r--example/src/Foo/Bar.purs13
-rw-r--r--example/src/Foo/Baz.purs3
-rw-r--r--example/src/Foo/Boz.purs5
-rw-r--r--example/src/FooFFI.js5
-rw-r--r--example/src/Test.purs7
-rw-r--r--example/src/TestFFI.js7
-rw-r--r--example/src/entry.js11
-rw-r--r--example/src/jam.js5
-rw-r--r--example/webpack.config.js28
16 files changed, 1 insertions, 170 deletions
diff --git a/.gitignore b/.gitignore
index 6c930c3..0a05586 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,8 +6,4 @@ index.js
6node_modules/ 6node_modules/
7bower_components/ 7bower_components/
8build/ 8build/
9example/bundle.js
10example/node_modules/
11example/bower_components/
12example/output/
13tmp/ 9tmp/
diff --git a/README.md b/README.md
index e93e969..df92e69 100644
--- a/README.md
+++ b/README.md
@@ -14,36 +14,4 @@ npm install purs-loader --save-dev
14 14
15## Example 15## Example
16 16
17```js 17Refer to the [purescript-webpack-example](https://github.com/ethul/purescript-webpack-example) for an example.
18// webpack.config.js
19'use strict';
20
21var PurescriptWebpackPlugin = require('purescript-webpack-plugin');
22
23var src = ['bower_components/purescript-*/src/**/*.purs', 'src/**/*.purs'];
24
25var ffi = ['bower_components/purescript-*/src/**/*.js', 'src/**/*FFI.js'];
26
27var modulesDirectories = [
28 'node_modules',
29 'bower_components'
30];
31
32var 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
46module.exports = config;
47```
48
49See the [example](https://github.com/ethul/purs-loader/tree/master/example) directory for a complete example.
diff --git a/example/README.md b/example/README.md
deleted file mode 100644
index bac4f6c..0000000
--- a/example/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
1```bash
2bower install
3npm install
4npm run-script build
5npm run-script run
6```
diff --git a/example/bower.json b/example/bower.json
deleted file mode 100644
index c83e735..0000000
--- a/example/bower.json
+++ /dev/null
@@ -1,7 +0,0 @@
1{
2 "name": "example",
3 "private": true,
4 "devDependencies": {
5 "purescript-prelude": "~0.1.0"
6 }
7}
diff --git a/example/package.json b/example/package.json
deleted file mode 100644
index e256de8..0000000
--- a/example/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
1{
2 "name": "example",
3 "version": "0.0.0",
4 "private": true,
5 "scripts": {
6 "build": "webpack --progress --colors --bail",
7 "build:watch": "webpack --progress --colors --watch",
8 "run": "node bundle.js",
9 "clean": "rm -rf bower_components && rm -rf bundle.js && rm -rf node_modules && rm -rf output"
10 },
11 "license": "MIT",
12 "devDependencies": {
13 "node-libs-browser": "^0.5.2",
14 "purescript-webpack-plugin": "^0.1.1",
15 "purs-loader": "file:../",
16 "webpack": "^1.12.9"
17 }
18}
diff --git a/example/src/Bar.purs b/example/src/Bar.purs
deleted file mode 100644
index a37171f..0000000
--- a/example/src/Bar.purs
+++ /dev/null
@@ -1,3 +0,0 @@
1module Bar where
2
3test = "b"
diff --git a/example/src/Foo.purs b/example/src/Foo.purs
deleted file mode 100644
index a715be0..0000000
--- a/example/src/Foo.purs
+++ /dev/null
@@ -1,15 +0,0 @@
1module Foo where
2
3import Prelude
4
5import qualified Foo.Bar as B
6
7foo = "A"
8
9bar = "B"
10
11jaz = "D" ++ B.jar ++ B.jee
12
13foreign import foot :: String
14
15foreign import meter :: String
diff --git a/example/src/Foo/Bar.purs b/example/src/Foo/Bar.purs
deleted file mode 100644
index 1b0919c..0000000
--- a/example/src/Foo/Bar.purs
+++ /dev/null
@@ -1,13 +0,0 @@
1module Foo.Bar (bar, jar, jee) where
2
3import Foo.Boz
4
5bar = "u"
6
7bar' = "d"
8
9jam = "c"
10
11jar = "xyzw"
12
13jee = "abcde"
diff --git a/example/src/Foo/Baz.purs b/example/src/Foo/Baz.purs
deleted file mode 100644
index 7b0451e..0000000
--- a/example/src/Foo/Baz.purs
+++ /dev/null
@@ -1,3 +0,0 @@
1module Foo.Baz (baz) where
2
3baz = "d"
diff --git a/example/src/Foo/Boz.purs b/example/src/Foo/Boz.purs
deleted file mode 100644
index c802e47..0000000
--- a/example/src/Foo/Boz.purs
+++ /dev/null
@@ -1,5 +0,0 @@
1module Foo.Boz where
2
3a = "a"
4
5b = "b"
diff --git a/example/src/FooFFI.js b/example/src/FooFFI.js
deleted file mode 100644
index a2681c8..0000000
--- a/example/src/FooFFI.js
+++ /dev/null
@@ -1,5 +0,0 @@
1// module Foo
2
3exports.foot = "a";
4
5exports.meter = "b";
diff --git a/example/src/Test.purs b/example/src/Test.purs
deleted file mode 100644
index 3a92681..0000000
--- a/example/src/Test.purs
+++ /dev/null
@@ -1,7 +0,0 @@
1module Test (testing) where
2
3bar = "c"
4
5goo = "a"
6
7foreign import testing :: String
diff --git a/example/src/TestFFI.js b/example/src/TestFFI.js
deleted file mode 100644
index dc2f04f..0000000
--- a/example/src/TestFFI.js
+++ /dev/null
@@ -1,7 +0,0 @@
1'use strict';
2
3// module Test
4
5var testing = 'abcde';
6
7exports.testing = testing;
diff --git a/example/src/entry.js b/example/src/entry.js
deleted file mode 100644
index a1e2a99..0000000
--- a/example/src/entry.js
+++ /dev/null
@@ -1,11 +0,0 @@
1var Prelude = require('purescript-prelude/src/Prelude');
2
3var test = require('./Test');
4
5var foo = require('./Foo.purs');
6
7var baz = require('./Foo/Baz');
8
9var jam = require('./jam');
10
11console.log(Prelude, test, foo, baz, jam);
diff --git a/example/src/jam.js b/example/src/jam.js
deleted file mode 100644
index 8889a69..0000000
--- a/example/src/jam.js
+++ /dev/null
@@ -1,5 +0,0 @@
1var x = 'a';
2
3var abcde = require('./Bar');
4
5module.exports = abcde;
diff --git a/example/webpack.config.js b/example/webpack.config.js
deleted file mode 100644
index 602de84..0000000
--- a/example/webpack.config.js
+++ /dev/null
@@ -1,28 +0,0 @@
1'use strict';
2
3var PurescriptWebpackPlugin = require('purescript-webpack-plugin');
4
5var src = ['bower_components/purescript-*/src/**/*.purs', 'src/**/*.purs'];
6
7var ffi = ['bower_components/purescript-*/src/**/*.js', 'src/**/*FFI.js'];
8
9var modulesDirectories = [
10 'node_modules',
11 'bower_components'
12];
13
14var config
15 = { entry: './src/entry'
16 , output: { path: __dirname
17 , pathinfo: true
18 , filename: 'bundle.js'
19 }
20 , module: { loaders: [ { test: /\.purs$/
21 , loader: 'purs-loader'
22 } ] }
23 , resolve: { modulesDirectories: modulesDirectories, extensions: [ '', '.js', '.purs'] }
24 , plugins: [ new PurescriptWebpackPlugin({src: src, ffi: ffi}) ]
25 }
26 ;
27
28module.exports = config;