Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM support #57

Closed
souporserious opened this issue Jun 23, 2022 · 8 comments
Closed

NPM support #57

souporserious opened this issue Jun 23, 2022 · 8 comments

Comments

@souporserious
Copy link

First, thank you for such a great polyfill! The performance is much smoother than traditional scroll events. I was curious if this package will be available on NPM? I noticed scroll-timeline-polyfill doesn't exist in the registry, but it looks like everything is set up for this to work. I'm currently wanting to play with this polyfill in a React Codesandbox which uses create react app and doesn't seem to currently support URL imports. I was able to copy the dist file, but was curious if an NPM package will be supported to make things a little easier in these situations.

@okyanusoz
Copy link

If you need help, I can publish the package.

@Azarattum
Copy link

It would be nice if somebody were to publish and maintain this package.

@curtgrimes
Copy link

Telling npm/yarn/pnpm to install from GitHub could also be an option if importing the src/index.js file works directly (I was able to install, but did not try going further because I realized this polyfill won't work for my use case):

pnpm i -D github:flackr/scroll-timeline
# or: 
pnpm i -D github:flackr/scroll-timeline#b3d05a5

@dy
Copy link

dy commented Jan 4, 2024

@flackr any reason this is not published to npm?

@calinoracation
Copy link
Contributor

I started looking at this a bit and pulled in the package by SHA to start with. Since there's no bundled dist/ folder in the repo now, that doesn't work incredibly well. I also needed to change the microbundle in the build script to not use -f to produce more formats, specifically my bundler was only happy using the dist/scroll-timeline-polyfill.modern.js output.

If it were being published, it might make sense to move that to the browser field in package.json and make those changes to include dist/ by default in the published tarball.

@bramus bramus mentioned this issue Feb 9, 2024
@flackr
Copy link
Owner

flackr commented Feb 12, 2024

I also have started looking into getting this set up. The rough plan is in PR #224 (comment) with the build switch to vite. I think I should be able to set up a github action to publish releases to npm automatically following https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

@calinoracation
Copy link
Contributor

Not sure if it's valuable but I've started testing publishing in a for-internal fork prior to the publishing y'all are going to do. I added some initial support to publish types with the package and a ES / CJS build.

@souporserious
Copy link
Author

Just noticed this library has been published to NPM 🎉 thank you @flackr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants