aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PursLoader/LoaderRef.js
diff options
context:
space:
mode:
authorAlex Mingoia <talk@alexmingoia.com>2016-05-10 00:09:28 -0700
committerAlex Mingoia <talk@alexmingoia.com>2016-05-10 00:09:28 -0700
commit7de41f10b4ff0f0d6b45d59bee0f166c3cfe3f9f (patch)
tree9ee160ba5b7dab900ccd1cfa657760e4103a175e /src/PursLoader/LoaderRef.js
parent777472b3830cb3d2ff3390003ea422c6d4522715 (diff)
downloadpurs-loader-7de41f10b4ff0f0d6b45d59bee0f166c3cfe3f9f.tar.gz
purs-loader-7de41f10b4ff0f0d6b45d59bee0f166c3cfe3f9f.tar.zst
purs-loader-7de41f10b4ff0f0d6b45d59bee0f166c3cfe3f9f.zip
Refactor to compile independently of purescript-webpack-plugin.
- Remove dependence on purescript-webpack-plugin - Fixes double-compilation issue by loading compiled JS instead of adding dependency. - Uses `psc-ide-server` for fast rebuilds.
Diffstat (limited to 'src/PursLoader/LoaderRef.js')
-rw-r--r--src/PursLoader/LoaderRef.js50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/PursLoader/LoaderRef.js b/src/PursLoader/LoaderRef.js
deleted file mode 100644
index a5d8e1f..0000000
--- a/src/PursLoader/LoaderRef.js
+++ /dev/null
@@ -1,50 +0,0 @@
1'use strict';
2
3// module PursLoader.LoaderRef
4
5function asyncFn(isJust, fromMaybe, ref){
6 return function(){
7 var callback = ref.async();
8 return function(error){
9 return function(value){
10 return function(){
11 return isJust(error) ? callback(fromMaybe(new Error())(error))
12 : callback(null, value);
13 };
14 };
15 };
16 };
17}
18function cacheable(ref){
19 return function(){
20 return ref.cacheable && ref.cacheable();
21 };
22}
23
24function clearDependencies(ref){
25 return function(){
26 return ref.clearDependencies();
27 };
28}
29
30function resourcePath(ref){
31 return ref.resourcePath;
32}
33
34function addDependency(ref){
35 return function(dep){
36 return function(){
37 return ref.addDependency(dep);
38 };
39 };
40}
41
42exports.asyncFn = asyncFn;
43
44exports.cacheable = cacheable;
45
46exports.clearDependencies = clearDependencies;
47
48exports.resourcePath = resourcePath;
49
50exports.addDependency = addDependency;