Giter Club home page Giter Club logo

Comments (8)

borismus avatar borismus commented on May 21, 2024 1

Alright, I basically don't care about keeping the src/ files in there or not, so will make this change. (By the way you're still saying .gitignore where you mean .npmignore, I think?)

from webvr-polyfill.

borismus avatar borismus commented on May 21, 2024

Not sure what you mean, src is not in .gitignore.

On Wed, Mar 16, 2016 at 2:24 PM Brian Chirls [email protected]
wrote:

Would it be possible to add the source files back into the npm package? I
found it very useful for making minor customizations.

I don't think there's much down side to including these files, since
they're not very big and would not affect what's delivered to the browser
for people who want to use the built file. This would not include
node_modules.

Thanks


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#44

from webvr-polyfill.

ashconnell avatar ashconnell commented on May 21, 2024

I think he meant .npmignore.

from webvr-polyfill.

brianchirls avatar brianchirls commented on May 21, 2024

Sorry, yeah, I meant .npmignore.

from webvr-polyfill.

borismus avatar borismus commented on May 21, 2024

Ah, I see. Including the source seems a bit odd since it can be found in this github repo too, wouldn't you say? As far as I can tell, other packages don't include the unbuilt source.

from webvr-polyfill.

brianchirls avatar brianchirls commented on May 21, 2024

Yes, the source is in the github repo, but it's not accessible at all via npm. Even if you point npm to the git repo instead of the npm registry, it still obeys .npmignore and leaves out the source. So one would have to update the webvr-polyfill dependency manually, which is no good.

A lot of other packages do leave in the un-built source, though many of them probably just forgot to make a .npmignore in the first place. I think the ideal scenario is that when a library is built out of components that are useful individually (as yours is; well done), each component is made available as its own npm package, even if they're all in the same repo. But it's a lot of work, and I'm not asking that. Leaving the source in is a good compromise, with main still pointing to the built file.

For example, Cannon.js is doing this, as discussed here. It's nice in case anyone wants to use their vector math or something like that.

from webvr-polyfill.

brianchirls avatar brianchirls commented on May 21, 2024

Oh, there's another significant potential benefit:

There are a number of components that require three-math, which it looks like you've included manually. If you were to include it from the npm package, someone referencing the source files could alias it to the three.js package. That way they wouldn't need to double up on all that math code.

from webvr-polyfill.

brianchirls avatar brianchirls commented on May 21, 2024

Ugh, yeah, I don't know why I keep typing that. I'll change it for future reference.

...and thanks!

from webvr-polyfill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.