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

Request: Include UI Pack file in package.json (for npm) #97

Closed
feross opened this issue Jun 4, 2014 · 8 comments
Closed

Request: Include UI Pack file in package.json (for npm) #97

feross opened this issue Jun 4, 2014 · 8 comments

Comments

@feross
Copy link

feross commented Jun 4, 2014

I want to use velocity.ui.js but it's not published to npm.

npm install velocity-animate

$ ls node_modules/velocity-animate
README.md          jquery.velocity.js package.json

Not sure why it didn't get published -- can you look into this?

@julianshapiro julianshapiro changed the title npm version is missing many files Request: Include UI Pack file in npm package.json Jun 4, 2014
@julianshapiro julianshapiro changed the title Request: Include UI Pack file in npm package.json Request: Include UI Pack file in package.json (for npm) Jun 4, 2014
@julianshapiro
Copy link
Owner

I don't use npm, so I'm not familiar with the workflow, but: I wanted to avoid forcing people to have to delete velocity.ui.js if they weren't using it. I was prioritizing an "opt-in" experience instead of bloating people's folders with extra files. (Having said this, I think you're right -- I should include more files by default.)

Given your experience with npm, could you elucidate a bit on the workflow from a front-end development perspective.

@feross
Copy link
Author

feross commented Jun 4, 2014

You could publish velocity.ui.js as it's own module, and many in the community would advocate for that (small module philosophy). But since you already have the file in this repo, I would just publish it as part of the same module. Disk space is cheap. Anyone using a sane bundler (like browserify, for example) won't get the extra file included in their final JS file unless they explicitly require it.

So, those who want the ui file would simply need to do:

require('velocity-animate/velocity.ui')

@feross
Copy link
Author

feross commented Jun 4, 2014

How did you ignore the file in the first place? I don't see an .npmignore file in the repo.

@julianshapiro
Copy link
Owner

Anyone using a sane bundler (like browserify, for example) won't get the extra file included in their final JS file unless they explicitly require it.

Got it. I'll update the file in an hour or so. Thanks, Feross.

How did you ignore the file in the first place? I don't see an .npmignore file in the repo.

In the package.json, I whitelisted files using files.

@feross
Copy link
Author

feross commented Jun 4, 2014

Thanks!

@hew
Copy link

hew commented Aug 26, 2015

Anyone know of a similar workaround as above, but for jspm?

@RandallGit
Copy link

with just npm how would I use velocity-ui-pack?

@feross
Copy link
Author

feross commented Jan 18, 2017

@RandallGit I suggest opening a new issue instead of posting in one that's almost two years old.

Rycochet pushed a commit that referenced this issue Aug 3, 2020
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

4 participants