pestle icon indicating copy to clipboard operation
pestle copied to clipboard

New Feature Request - M2 empty JS module generating

Open eralaz opened this issue 6 years ago • 3 comments

New Feature Request - M2 empty JS module generating

eralaz avatar Jul 06 '18 13:07 eralaz

It's not clear what this means. What's an empty JS module?

astorm avatar Jul 06 '18 13:07 astorm

An empty JS module is

  • layout(cms_index_index / or could be prompted)->block (type of template)->template with html tag which have attr data-magento-init="{module:{config1}}"
  • view/frontend/requirejs-config.js
  • view/frontend/web/js/module.js define([ 'jquery' ], function($) { "use sctrict"; console.log(An empty JS module is ready to use!); } });

eralaz avatar Jul 06 '18 16:07 eralaz

and command who generates it

pestle magento2:generate:js

eralaz avatar Jul 06 '18 16:07 eralaz