With this PR, a basePath can be specified when creating a Resource which defaults to null.
Also, when working with the Datapackage class, a basePath can be specified. If not specified and the descriptor is a local path, the dirname of the descriptor path is used as the basePath. This makes sense because as per Datapackage specs, resources location can't be behind the datapackage.json directory in the directory tree (nor the URI can contain ..).
Fixes frictionlessdata/datapackage-js#26
With this PR, a
basePath
can be specified when creating a Resource which defaults tonull
.Also, when working with the Datapackage class, a basePath can be specified. If not specified and the descriptor is a local path, the dirname of the descriptor path is used as the basePath. This makes sense because as per Datapackage specs, resources location can't be behind the
datapackage.json
directory in the directory tree (nor the URI can contain..
).