snowplow / snowplow-javascript-tracker

Snowplow event tracker for client-side and server-side JavaScript. Add analytics to your websites, web apps and servers.
http://snowplowanalytics.com
BSD 3-Clause "New" or "Revised" License
547 stars 220 forks source link

@snowplow/javascript-tracker is missing `files` in package.json #1146

Closed AndersCan closed 1 year ago

AndersCan commented 1 year ago

Describe the bug The files that are published to NPM contain all build files and folders: https://unpkg.com/browse/@snowplow/javascript-tracker@3.8.0/

I assume you don't want to publish everything

To Reproduce N/A

Expected behavior Only required folders/files

Screenshots image

Desktop (please complete the following information): N/A

Smartphone (please complete the following information): N/A

Additional context N/A

igneel64 commented 1 year ago

Hey @AndersCan :) Thank you for spotting that. The javascript-tracker is not meant to be installed as an npm package but rather self-hosted or grabbed by a CDN. On our instructions we already point on the specific dist files needed.

On that note though I am going to add a fix for it. You are right, no need to have these files published.

AndersCan commented 1 year ago

...but rather self-hosted

That was my original plan: npm install and copy dist/ file from node_modules to cdn. Not sure how else I would do it (without manually copy+pasting).

I'm now however just using @snowplow/browser-tracker

igneel64 commented 1 year ago

@AndersCan We have some guidance on our documentation which describes both the CDN way and the self-hosting way: https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/web-quick-start-guide/

If you have any feedback on that or it was hard to find or not clear, please do let us know.