From 63d6a244462d050e119bde54a7063bae8a17e987 Mon Sep 17 00:00:00 2001 From: eric thul Date: Fri, 25 Dec 2015 18:41:33 -0500 Subject: Splitting PSC functionality into a separate plugin The loader creates shim modules that reference their corresponding PureScript module that is bundled by the PureScript webpack plugin, which invokes `psc` and `psc-bundle`. Resolves #31 and resolves #32 --- src/PursLoader/Path.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/PursLoader/Path.js (limited to 'src/PursLoader/Path.js') diff --git a/src/PursLoader/Path.js b/src/PursLoader/Path.js new file mode 100644 index 0000000..878f256 --- /dev/null +++ b/src/PursLoader/Path.js @@ -0,0 +1,24 @@ +'use strict' + +// module PursLoader.Path + +var path = require('path'); + +function relative(from) { + return function(to){ + return path.relative(from, to); + }; +} +exports.relative = relative; + + +function joinPath(a) { + return function(b) { + return path.join(a, b); + }; +} +exports.joinPath = joinPath; + +exports.resolve = path.resolve; + +exports.dirname = path.dirname; -- cgit v1.2.3