mpx200 / ng-dygraphs

Angular 2+ library for support of dygraphs(http://dygraphs.com) charts
MIT License
3 stars 9 forks source link

Unable to import component without deeplink #10

Closed krantik closed 6 years ago

krantik commented 6 years ago

To include the component in the project, the import statement has to look like this,

import {NgDygraphsComponent} from "ng-dygraphs/lib/src/ng-dygraphs.component";

Update index.ts to export the component and module

export { NvD3Component } from './lib/ng2-nvd3.component'; export { NvD3Module } from './lib/ng2-nvd3.module';

JimiC commented 6 years ago

The issue lies in package.json as main and typings are pointing to dist folder which is not provided.

@mpx200 As I was fixing this, I noticed that gulp build process is redundant and the same result can be achieved by using npm as the builder. Are you interested to make the switch? I have already a PR waiting that does that and also fixes this issue.

JimiC commented 6 years ago

Btw, this package.json issue also produces an error when building an ng 5 project which uses this library.

JimiC commented 6 years ago

I decided to split the PR in two. One that fixes the distro and one that switches to npm because the latest may raise some discussion.