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

Add bower.json file #4280

Merged
merged 3 commits into from
Jan 9, 2014
Merged

Add bower.json file #4280

merged 3 commits into from
Jan 9, 2014

Conversation

is-real
Copy link

@is-real is-real commented Jan 9, 2014

Basic setup to download the "build" folder when using Bower.

@mrdoob
Copy link
Owner

mrdoob commented Jan 9, 2014

How about...

"version": "0.0.64"

@is-real
Copy link
Author

is-real commented Jan 9, 2014

of course!

@mrdoob
Copy link
Owner

mrdoob commented Jan 9, 2014

great! :) now, noob question... would this download build/three.js only? ... or also build/three.min.js?

@is-real
Copy link
Author

is-real commented Jan 9, 2014

right now it would download both

@jeromeetienne
Copy link
Contributor

What about the examples/js directory ? there is a lot of reusable code in there

Should it be in this bower package ? in another ?

@mrdoob
Copy link
Owner

mrdoob commented Jan 9, 2014

As far as I understand, bower is used to automatically download dependencies, etc?

@cecilemuller
Copy link
Contributor

@mrdoob Yes indeed, and it's similar to npm: usually front-end dependencies are done with Bower while backend ones get done with npm.

The big differences (afaik) are:

  • Bower uses a flat list of dependencies whereas npm handles nested ones.
  • Bower can use arbitrary third-party repos whereas npm requires it to have a package.json definition

@mrdoob mrdoob merged commit 133ea5b into mrdoob:dev Jan 9, 2014
@mrdoob
Copy link
Owner

mrdoob commented Jan 9, 2014

Thanks! :)

@is-real
Copy link
Author

is-real commented Jan 9, 2014

@jeromeetienne I agree it would be very nice to also download the directory with all these extra three.js classes. It felt somehow weird to download all the JS of the examples folder without the examples... But that folder only has reusable classes, so it makes sense. What do you all think?

@jeromeetienne
Copy link
Contributor

@is-real i think we need a way to install those classes with bower, when we want to use them in our own project. I use bower myself to package my three.js extensions. bower search threex will returns the list.

And some of those extensions uses the examples/js/shaders or examples/js/postprocessing or others examples/js/... Currently bower doesnt provide a way for me to install those three.js parts in my project. So i copy the files manually. Not too shabby...

this manual copy is what bower is supposed to fix. so yeah i think we should package them. the way to package it is another story, but seems rather simple

@jeromeetienne
Copy link
Contributor

@is-real For the packages, i see 2 possibilities. one simple for the user but may be seen as sloppy. one more rigurous, but more cumbersome for the user

my preference seems to go on the first

one simple for the user but may be seen as sloppy

threejs-examplesjs contains all the code in /examples/js directory

It is super simple for the user. but it may install files you dont need. on the other hand nothing prevent you from deleting the files you dont need.

one more rigurous but more cumbersome for the user

  • threejs-examplesjs for all the files at root of examples/js
  • threejs-examplesjs-shaders for all the files in examples/js/shaders
  • threejs-examplesjs-postprocessing for all the files in examples/js/postprocessing
  • you get the ideas...

It ends up with 13 packages by my count... so more cumbersome to the users, but more rigourous because it is less likely to install files you dont need.

@mrdoob
Copy link
Owner

mrdoob commented Jan 9, 2014

Why not just threejs-examples?

@jeromeetienne
Copy link
Contributor

@mrdoob it would be fine by me

@is-real
Copy link
Author

is-real commented Jan 10, 2014

It is also ok for me, but I think we would need then to have a different repo for the examples.
Because it is one bower.json per repository, right? I'm quite noob to bower too ;)

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

Successfully merging this pull request may close these issues.

None yet

5 participants