frictionlessdata / datapackage-js

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

Fix readme examples #44

Closed roll closed 7 years ago

roll commented 7 years ago

Overview

Some of them contain typos like import { Datapackage } from 'datapackage' (now it's without {}).

Tasks

dumyan commented 7 years ago

Currently the curly brackets are needed because we don't have default export from index.js, just separate exports for Datapackage, Profiles and validate.

What we can do is add a default export for Datapackage class and use it without the curly brackets.

The README tests are included in the test suite running on travis, also I have checked it locally and everything works fine. Maybe you got timeout errors because some of the README tests are fetching the profiles remotely?

roll commented 7 years ago

It's pretty OK for us to have Datapackage, Resource and validate as equal top-level components so I suppose it's only about fixing import in examples.

Here we're getting a feedback - https://gitter.im/frictionlessdata/chat (so I've just reported it as an issue)

roll commented 7 years ago

Also we could just copy our readme examples as a part of https://github.com/frictionlessdata/datapackage-js/issues/33