diff options
author | eric <thul.eric@gmail.com> | 2015-07-18 17:11:00 -0400 |
---|---|---|
committer | eric <thul.eric@gmail.com> | 2015-07-18 17:11:00 -0400 |
commit | 78da2ff4a8ba259403efc166d3f753068221914e (patch) | |
tree | a4858f5e16e3df01aee249ad53b5b76f90fb97de /example/src | |
parent | 418c9429609c6d80ddaf7df41e0ee64192e2ec7b (diff) | |
parent | 3610dff1b8308a810d827f0595832b326deff37b (diff) | |
download | purs-loader-78da2ff4a8ba259403efc166d3f753068221914e.tar.gz purs-loader-78da2ff4a8ba259403efc166d3f753068221914e.tar.zst purs-loader-78da2ff4a8ba259403efc166d3f753068221914e.zip |
Merge pull request #20 from ethul/topic/issue-18
Add FFI JavaScript as a webpack dependency
Diffstat (limited to 'example/src')
-rw-r--r-- | example/src/Test.purs | 4 | ||||
-rw-r--r-- | example/src/TestFFI.js | 7 | ||||
-rw-r--r-- | example/src/entry.js | 8 |
3 files changed, 14 insertions, 5 deletions
diff --git a/example/src/Test.purs b/example/src/Test.purs index d9f1b96..133a192 100644 --- a/example/src/Test.purs +++ b/example/src/Test.purs | |||
@@ -1,5 +1,7 @@ | |||
1 | module Test (test) where | 1 | module Test (test, testing) where |
2 | 2 | ||
3 | import Prelude | 3 | import Prelude |
4 | 4 | ||
5 | test = "a" | 5 | test = "a" |
6 | |||
7 | foreign import testing :: String | ||
diff --git a/example/src/TestFFI.js b/example/src/TestFFI.js new file mode 100644 index 0000000..dc2f04f --- /dev/null +++ b/example/src/TestFFI.js | |||
@@ -0,0 +1,7 @@ | |||
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 index 344d4c6..a41536c 100644 --- a/example/src/entry.js +++ b/example/src/entry.js | |||
@@ -1,11 +1,11 @@ | |||
1 | var Prelude = require('Prelude'); | 1 | var Prelude = require('Prelude'); |
2 | 2 | ||
3 | var test = require('./Test'); | 3 | var test = require('./Test.purs'); |
4 | 4 | ||
5 | var foo = require('./Foo'); | 5 | var foo = require('./Foo.purs'); |
6 | 6 | ||
7 | var baz = require('./Foo/Baz'); | 7 | var baz = require('./Foo/Baz.purs'); |
8 | 8 | ||
9 | var bar = require('./Foo/Bar'); | 9 | var bar = require('./Foo/Bar.purs'); |
10 | 10 | ||
11 | console.log(Prelude, test, foo, baz, bar); | 11 | console.log(Prelude, test, foo, baz, bar); |