Skip to content

Commit

Permalink
make sure that an url is always passed to the compiler at least on node
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Dec 12, 2015
1 parent 12db70a commit 30c5d0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dist/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) }

Expand Down
7 changes: 7 additions & 0 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) }

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"compiler"
],
"dependencies": {
"riot-tmpl": "^2.3.16"
"riot-tmpl": "^2.3.17"
},
"devDependencies": {
"coveralls": "^2.11.4",
Expand Down

0 comments on commit 30c5d0e

Please sign in to comment.