diff options
author | eric thul <thul.eric@gmail.com> | 2016-03-13 10:06:11 -0400 |
---|---|---|
committer | eric thul <thul.eric@gmail.com> | 2016-03-13 10:06:11 -0400 |
commit | 1a7a07b7a4fa93a55a600ca9d466020f3e11ab5a (patch) | |
tree | 9af0a5120593adeb47229d6a564fee86ab9f0856 /example | |
parent | 0f0403a8359f316ece009442f2b3803e897cc9f1 (diff) | |
download | purs-loader-1a7a07b7a4fa93a55a600ca9d466020f3e11ab5a.tar.gz purs-loader-1a7a07b7a4fa93a55a600ca9d466020f3e11ab5a.tar.zst purs-loader-1a7a07b7a4fa93a55a600ca9d466020f3e11ab5a.zip |
Extracting out the example
Diffstat (limited to 'example')
-rw-r--r-- | example/README.md | 6 | ||||
-rw-r--r-- | example/bower.json | 7 | ||||
-rw-r--r-- | example/package.json | 18 | ||||
-rw-r--r-- | example/src/Bar.purs | 3 | ||||
-rw-r--r-- | example/src/Foo.purs | 15 | ||||
-rw-r--r-- | example/src/Foo/Bar.purs | 13 | ||||
-rw-r--r-- | example/src/Foo/Baz.purs | 3 | ||||
-rw-r--r-- | example/src/Foo/Boz.purs | 5 | ||||
-rw-r--r-- | example/src/FooFFI.js | 5 | ||||
-rw-r--r-- | example/src/Test.purs | 7 | ||||
-rw-r--r-- | example/src/TestFFI.js | 7 | ||||
-rw-r--r-- | example/src/entry.js | 11 | ||||
-rw-r--r-- | example/src/jam.js | 5 | ||||
-rw-r--r-- | example/webpack.config.js | 28 |
14 files changed, 0 insertions, 133 deletions
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 | ||
2 | bower install | ||
3 | npm install | ||
4 | npm run-script build | ||
5 | npm 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 @@ | |||
1 | module Bar where | ||
2 | |||
3 | test = "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 @@ | |||
1 | module Foo where | ||
2 | |||
3 | import Prelude | ||
4 | |||
5 | import qualified Foo.Bar as B | ||
6 | |||
7 | foo = "A" | ||
8 | |||
9 | bar = "B" | ||
10 | |||
11 | jaz = "D" ++ B.jar ++ B.jee | ||
12 | |||
13 | foreign import foot :: String | ||
14 | |||
15 | foreign 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 @@ | |||
1 | module Foo.Bar (bar, jar, jee) where | ||
2 | |||
3 | import Foo.Boz | ||
4 | |||
5 | bar = "u" | ||
6 | |||
7 | bar' = "d" | ||
8 | |||
9 | jam = "c" | ||
10 | |||
11 | jar = "xyzw" | ||
12 | |||
13 | jee = "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 @@ | |||
1 | module Foo.Baz (baz) where | ||
2 | |||
3 | baz = "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 @@ | |||
1 | module Foo.Boz where | ||
2 | |||
3 | a = "a" | ||
4 | |||
5 | b = "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 | |||
3 | exports.foot = "a"; | ||
4 | |||
5 | exports.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 @@ | |||
1 | module Test (testing) where | ||
2 | |||
3 | bar = "c" | ||
4 | |||
5 | goo = "a" | ||
6 | |||
7 | foreign 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 | |||
5 | var testing = 'abcde'; | ||
6 | |||
7 | exports.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 @@ | |||
1 | var Prelude = require('purescript-prelude/src/Prelude'); | ||
2 | |||
3 | var test = require('./Test'); | ||
4 | |||
5 | var foo = require('./Foo.purs'); | ||
6 | |||
7 | var baz = require('./Foo/Baz'); | ||
8 | |||
9 | var jam = require('./jam'); | ||
10 | |||
11 | console.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 @@ | |||
1 | var x = 'a'; | ||
2 | |||
3 | var abcde = require('./Bar'); | ||
4 | |||
5 | module.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 | |||
3 | var PurescriptWebpackPlugin = require('purescript-webpack-plugin'); | ||
4 | |||
5 | var src = ['bower_components/purescript-*/src/**/*.purs', 'src/**/*.purs']; | ||
6 | |||
7 | var ffi = ['bower_components/purescript-*/src/**/*.js', 'src/**/*FFI.js']; | ||
8 | |||
9 | var modulesDirectories = [ | ||
10 | 'node_modules', | ||
11 | 'bower_components' | ||
12 | ]; | ||
13 | |||
14 | var 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 | |||
28 | module.exports = config; | ||