lasso-js / lasso

Advanced JavaScript module bundler, asset pipeline and optimizer
581 stars 75 forks source link

Question regarding module relationships. #170

Open basickarl opened 7 years ago

basickarl commented 7 years ago

I have a few questions about the following modules and their relationships to each other:

https://github.com/marko-js/marko

https://github.com/marko-js/marko-widgets

https://github.com/lasso-js/lasso

https://github.com/lasso-js/lasso-marko

1) I looked at the package.json of lasso-marko and I see both lasso and marko. So my question is if I install lasso-marko do I need to install lasso and marko? 2) If marko-widgets extends marko, does that mean that if I use the marko-widgets module, I do not need the marko module? 3) Seems like marko, marko-widgets and lasso-marko all scan the directories and generate *.marko.js files. Isn't this unnecessary? Or have I understood it wrong?

If you could explain in general terms what they all do and their relationship to each other I think I could grip this better (still trying to learn^^).

davidenq commented 7 years ago

You can try online with marko and marko-widgets to understand how it work.

About marko

I'm not expert with marko and marko-widgets but can I understand that marko not only generate a .marko.js, marko compile a template (render a template on the server or in the browser). It isn't necessary generate a *.marko.js, you can disable this option using require('marko/compiler').defaultOptions.writeToDisk = false; You can see more about that here.

About marko-widgets

marko-widgets is similary to vuejs or riotjs or react. You can see about more features here

About lasso

Lasso is similary to browserify. takes modules with dependencies and generates static assets optimized representing those modules. You can use for production.

About lasso-marko

Is a plugin for lasso. It's amazing because you can work through modularization with webcomponents and lasso generates static assets for you.

Relationship with marko, marko-widgets, lasso and lasso-marko

your questions

  1. Yes, You need install marko and lasso and if you want use marko-widgets, You must install it too
  2. marko is a dependency to marko-widgets. then You need install both.
  3. I'm not sure how to respond this question.

I hope to have helped a bit and sorry for my english and my apologize if I'm wrong.