diff --git a/dist/compiler.js b/dist/compiler.js index 423ec00..134b73c 100644 --- a/dist/compiler.js +++ b/dist/compiler.js @@ -523,6 +523,8 @@ function compile(src, opts, url) { if (!opts) opts = {} + url = url || process.cwd() + exclude = opts.exclude || false function included(s) { return !(exclude && ~exclude.indexOf(s)) } diff --git a/lib/core.js b/lib/core.js index ebdef33..7273a67 100644 --- a/lib/core.js +++ b/lib/core.js @@ -532,6 +532,13 @@ function compile(src, opts, url) { if (!opts) opts = {} + //#if NODE + // let's be sure that an url is always defined at least on node + // this will allow the babeljs users using the .babelrc file to configure + // their transpiler setup + url = url || process.cwd() + //#endif + exclude = opts.exclude || false function included(s) { return !(exclude && ~exclude.indexOf(s)) } diff --git a/package.json b/package.json index 020d726..0270387 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "compiler" ], "dependencies": { - "riot-tmpl": "^2.3.16" + "riot-tmpl": "^2.3.17" }, "devDependencies": { "coveralls": "^2.11.4",