+npm-debug.log
node_modules/
example/node_modules/
example/bower_components/
+++ /dev/null
-<!doctype html>
-<html class="no-js" lang="">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title></title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- </head>
- <body>
- <!--[if lt IE 8]>
- <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
- <![endif]-->
- <!-- Add your site or application content here -->
- <p>Hello world! This is HTML5 Boilerplate.</p>
- <script src="dist/app.js"></script>
- </body>
-</html>
"private": true,
"scripts": {
"webpack": "./node_modules/.bin/webpack",
- "run": "node dist/app.js"
+ "run": "node dist/app.js",
+ "clean": "rm -rf bower_components && rm -rf dist && rm -rf node_modules && rm -rf output"
},
"license": "MIT",
"devDependencies": {
module Foo (foo) where
import Data.Maybe
+import qualified Foo.Bar as B
foo = "b"
--- /dev/null
+module Foo.Bar (bar) where
+
+bar = "c"
--- /dev/null
+module Foo.Baz (baz) where
+
+baz = "d"
var foo = require('purs?output=output!./Foo.purs');
-console.log(test, foo);
+var baz = require('purs?output=output!./Foo/Baz.purs');
+
+console.log(test, foo, baz);
, chalk = require('chalk')
, lu = require('loader-utils')
, cwd = process.cwd()
+ , MODULE_RE = /^module\s+([\w\.]+)\s+/i
, BOWER_PATTERN = path.join('bower_components', 'purescript-*', 'src')
, PSC_MAKE = 'psc-make'
, OUTPUT = 'output'
cmd.on('close', function(e){
if (e) callback(e);
else {
- var module = path.basename(request, '.purs');
+ var result = MODULE_RE.exec(source);
+ var module = result.length > 1 ? result[1] : '';
fs.readFile(path.join(query[OUTPUT] || OUTPUT, module, 'index.js'), 'utf-8', function(e, output){
if (e) callback(e);
else callback(e, output);