p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

download of a modular generated library

Open nok opened this issue 11 years ago • 11 comments

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

nok avatar Dec 24 '13 14:12 nok

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

evhan55 avatar Jun 06 '14 00:06 evhan55

More discussion in processing/p5.js#522.

sarahghp avatar May 26 '15 19:05 sarahghp

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.)

workergnome avatar May 29 '15 01:05 workergnome

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

kadamwhite avatar May 29 '15 02:05 kadamwhite

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

nok avatar May 29 '15 06:05 nok

@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!

sakshamsaxena avatar Mar 12 '17 12:03 sakshamsaxena

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).

lmccart avatar Mar 14 '17 22:03 lmccart

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

nok avatar Mar 15 '17 07:03 nok

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 avatar Mar 15 '17 19:03 sakshamsaxena

(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: )

sakshamsaxena avatar Aug 27 '17 09:08 sakshamsaxena

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

lmccart avatar Sep 14 '17 23:09 lmccart