Closed mishanga closed 11 years ago
You didn't provide the filename
option, so roole tried to resolve the relative url to undefined
, and the path
module complained.
Looks like a more reasonable error message should be generated when required options are missing.
Maybe better to use './' by default when no path provided?
Good idea. But filename
has to be absolute. Maybe use cwd when no value is provided.
CWD will cause few additional ../
in path.
Where can I read about filename
option?
What do you mean by "few additional ../
"? I'm talking about process.cwd()
here.
the readme file of roole-parser contains the description of filename
option.
the out
option should also be provided, it should get a default value too.
Introduced a base
option, which will be used if filename
or out
is not provided. see roole-evaluator
CLI:
Result — OK:
Require:
Result — Error:
Hack:
compile('...', { out: './' }, function(...){...}
Debug info: