aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--example/package.json7
-rw-r--r--example/src/Foo.purs6
-rw-r--r--example/src/Test.purs6
-rw-r--r--example/src/entry.js2
-rw-r--r--example/webpack.config.js18
-rw-r--r--package.json1
6 files changed, 19 insertions, 21 deletions
diff --git a/example/package.json b/example/package.json
index d1319b1..5f7ee63 100644
--- a/example/package.json
+++ b/example/package.json
@@ -3,15 +3,16 @@
3 "version": "0.0.0", 3 "version": "0.0.0",
4 "private": true, 4 "private": true,
5 "scripts": { 5 "scripts": {
6 "build": "mkdir -p output && ./node_modules/.bin/webpack --progress --colors", 6 "build": "webpack --progress --colors --bail",
7 "build:watch": "mkdir -p output && ./node_modules/.bin/webpack --progress --colors --watch", 7 "build:watch": "webpack --progress --colors --watch",
8 "run": "node bundle.js", 8 "run": "node bundle.js",
9 "clean": "rm -rf bower_components && rm -rf bundle.js && rm -rf node_modules && rm -rf output" 9 "clean": "rm -rf bower_components && rm -rf bundle.js && rm -rf node_modules && rm -rf output"
10 }, 10 },
11 "license": "MIT", 11 "license": "MIT",
12 "devDependencies": { 12 "devDependencies": {
13 "node-libs-browser": "^0.5.2", 13 "node-libs-browser": "^0.5.2",
14 "purescript-webpack-plugin": "^0.1.0",
14 "purs-loader": "file:../", 15 "purs-loader": "file:../",
15 "webpack": "^1.10.1" 16 "webpack": "^1.12.9"
16 } 17 }
17} 18}
diff --git a/example/src/Foo.purs b/example/src/Foo.purs
index b234e0d..97b7cec 100644
--- a/example/src/Foo.purs
+++ b/example/src/Foo.purs
@@ -1,9 +1,9 @@
1module Foo (foo) where 1module Foo where
2 2
3import Prelude 3import Prelude
4 4
5import qualified Foo.Bar as B 5import qualified Foo.Bar as B
6 6
7foo = "b" 7foo = "A"
8 8
9foo' = "c" 9bar = "B"
diff --git a/example/src/Test.purs b/example/src/Test.purs
index 133a192..3a92681 100644
--- a/example/src/Test.purs
+++ b/example/src/Test.purs
@@ -1,7 +1,7 @@
1module Test (test, testing) where 1module Test (testing) where
2 2
3import Prelude 3bar = "c"
4 4
5test = "a" 5goo = "a"
6 6
7foreign import testing :: String 7foreign import testing :: String
diff --git a/example/src/entry.js b/example/src/entry.js
index cde8507..be0a475 100644
--- a/example/src/entry.js
+++ b/example/src/entry.js
@@ -1,4 +1,4 @@
1var Prelude = require('Prelude'); 1var Prelude = require('purescript-prelude/src/Prelude.purs');
2 2
3var test = require('./Test.purs'); 3var test = require('./Test.purs');
4 4
diff --git a/example/webpack.config.js b/example/webpack.config.js
index f1456d5..7f468c8 100644
--- a/example/webpack.config.js
+++ b/example/webpack.config.js
@@ -1,14 +1,14 @@
1var path = require('path'); 1'use strict';
2 2
3var srcs = ['src[]=bower_components/purescript-*/src/**/*.purs', 'src[]=src/**/*.purs']; 3var PurescriptWebpackPlugin = require('purescript-webpack-plugin');
4 4
5var ffis = ['ffi[]=bower_components/purescript-*/src/**/*.js', 'ffi[]=src/**/*FFI.js']; 5var src = ['bower_components/purescript-*/src/**/*.purs', 'src/**/*.purs'];
6 6
7var output = 'output'; 7var ffi = ['bower_components/purescript-*/src/**/*.js', 'src/**/*FFI.js'];
8 8
9var modulesDirectories = [ 9var modulesDirectories = [
10 'node_modules', 10 'node_modules',
11 'bower_components/purescript-prelude/src' 11 'bower_components'
12]; 12];
13 13
14var config 14var config
@@ -18,12 +18,10 @@ var config
18 , filename: 'bundle.js' 18 , filename: 'bundle.js'
19 } 19 }
20 , module: { loaders: [ { test: /\.purs$/ 20 , module: { loaders: [ { test: /\.purs$/
21 , loader: 'purs-loader?output=' + output + '&' + srcs.concat(ffis).join('&') 21 , loader: 'purs-loader'
22 } ] } 22 } ] }
23 , resolve: { modulesDirectories: modulesDirectories 23 , resolve: { modulesDirectories: modulesDirectories }
24 , extensions: ['', '.js'] 24 , plugins: [ new PurescriptWebpackPlugin({src: src, ffi: ffi}) ]
25 }
26 , resolveLoader: { root: path.join(__dirname, 'node_modules') }
27 } 25 }
28 ; 26 ;
29 27
diff --git a/package.json b/package.json
index 3bcd03f..13d4c6c 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,6 @@
26 "dependencies": { 26 "dependencies": {
27 "async": "^1.3.0", 27 "async": "^1.3.0",
28 "chalk": "^1.1.0", 28 "chalk": "^1.1.0",
29 "glob": "^5.0.3",
30 "loader-utils": "^0.2.6" 29 "loader-utils": "^0.2.6"
31 } 30 }
32} 31}