Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Componentjs vs requirejs?

What benefits to use componentjs (https://github.com/component/component) instead of requirejs?

Both project has the same idea, hard to make choice between them.

like image 831
mikach Avatar asked Dec 11 '25 08:12

mikach


1 Answers

RequireJS is just a JavaScript file and module loader.

Component is a whole system which allows you to package HTML+JS+CSS+Images+Fonts in a one module, component. Component also provides package registry(vs npm), dependency handling(vs requirejs), build and task system(vs grunt/gulp).

There's good document where component is compared to other build/package handling tools: https://github.com/component/guide/blob/master/component/vs.md

This blog post helped me to understand component: http://blog.benmcmahen.com/post/55280740882/using-component-js

like image 104
Kimmo Avatar answered Dec 12 '25 21:12

Kimmo