processing / p5.js-website-legacy

Archived p5.js website 2015-2024
http://archive.p5js.org
MIT License
242 stars 482 forks source link

download of a modular generated library #520

Open nok opened 10 years ago

nok commented 10 years ago

In the majority of cases I used canvas libs for simple drawings, but I had to download the complete library. In my view it's a huge disadvantage, because the libraries are almost fat.

It would be a huge advantage, if we could offer a download of a modular generated library. I imagine something like the Modernizr download page, where you can select parts of the library (primitives, lights, camrea, ...).

In addition we could add a seperate namespace.

What do you think?

Regards, Darius

evhan55 commented 10 years ago

We are excited about this idea and have started looking at modules such as: https://github.com/lmccart/p5.js/blob/main/lib/addons/p5.dom.js

sarahghp commented 9 years ago

More discussion in processing/p5.js#522.

workergnome commented 9 years ago

Just to clarify: This is not about the modularization of the library, that's in processing/p5.js#522. After modularization, this is about building into the website the ability to download a specific build of the website containing only the code that you need.

(If I'm wrong about that, please let me know.)

kadamwhite commented 9 years ago

Based on the Modernizr example I believe that is correct; another example would be something along the lines of https://lodash.com/custom-builds

nok commented 9 years ago

Yes, your additional examples are matching my example and the basic idea.

sakshamsaxena commented 7 years ago

@lmccart Hi! I'd to know if this is still open for consideration? I really like this idea! I'd love to pitch this in my GSoC 17 proposal :smile: Could you please share any recent developments which you think would be related to this ? Thanks!

lmccart commented 7 years ago

hi @sakshamsaxena, yes it's totally open. there's not really been any development on this but it'd be an exciting addition. the furthest we got was separating the src into folders and creating a "core" folder. i'd imagine this core would be the basis for any custom build of p5.js, and the other components could be based on the other folders in src (ex: typography, webgl, etc).

nok commented 7 years ago

(@lmccart) @sakshamsaxena, if you need any help or support, we can build it together. 😄

sakshamsaxena commented 7 years ago

Thanks for the encouragement! I'm hunting a couple more feature requests/pending bugs which I'd like to work on, apart from studying the code and fiddling with the source. Will soon get back with a solid proposal!

sakshamsaxena commented 7 years ago

(Re)Activating the discussion.

Over the summer, I worked closely with @lmccart on generating a custom library with specific modules, as was the goal here, using Grunt. I think it works splendidly as of now, but is limited to CLI usage, and still needs to be tested out in production (still fingers crossed!). Though the aim was to make this available on the website too, but we underestimated the time required to get the basic task of building done.

Would be picking up the task from next week onwards, after some discussion of ideas and constraints on implementing this on the website! ( @nok Would love to hear from you again :smiley: )

lmccart commented 7 years ago

currently, it is possible to create builds with custom combinations of modules. this happens right now as a grunt task. the next step is to add the website interface for allowing users to specify the modules they'd like to include and dynamically creating a build. the issue for the website portion of this task, to be completed first is here: https://github.com/processing/p5.js-website/issues/138