Building new release of ngx-charts

592 Views Asked by At

I'm attempting to add a personally desired feature for ngx-charts. I got it to work using the standard src directory but, I wanted to build a release version potentially.

Here are the steps to reproduce the issue:

  1. npm i https://github.com/swimlane/ngx-charts/tarball/master --save (this grabs the entire project instead of just the release)
  2. Go into your node_modules/@swimlane/ngx-charts folder and delete the release directory
  3. Rebuild the directory by running npm i && npm run package
  4. Notice how index.d.ts is unable to find any modules even though they're there.

I have noticed that the /common/base-chart.component.d.ts file is never created for some reason causing this problem. But, I cannot for the life of my figure out why. I've tried multiple webpack versions 2-4 but, every attempt results in the same thing.

I believe I am doing something wrong which is why I did not open an issue. I would appreciate any insight into this problem. Thank you for reading!

1

There are 1 best solutions below

0
On BEST ANSWER

I would recommend cloning the repository locally rather than installing it from npm:

git clone [email protected]:swimlane/ngx-charts.git

Then install dependencies:

cd ngx-charts
npm install

After that make your changes to the src (you can run the demo app to test while developing with "npm run start")

Then to package:

npm run package

This will build the project and update the release folder