frictionlessdata / datapackage-js

A JavaScript library for working with Data Package.
http://frictionlessdata.io/
MIT License
43 stars 15 forks source link

Resources base path #26

Closed dumyan closed 7 years ago

dumyan commented 7 years ago

Currently resources path is handled from the current working directory (where the library is initialized).

One obvious problem with this is that it makes it impossible to load datapackage resources when starting the library from a different directory then the datapackage itself, and then loading the datapackage descriptor from a file (the descriptor points to the resources relative to its directory and the library tries to open them relative to the working directory).

roll commented 7 years ago

@dumyan So we could add basePath argument to DataPackage and Resource constructors like in the python library. WDYT?