$mol apps live inside MAM — the build tool and module registry. You clone it once and develop your modules inside it:1gitclonehttps://github.com/hyoo-ru/mam.git./mam2cdmam3npminstall4npmstartnpmstart runs a watching dev server on http://localhost:9080/. It rebuilds on save and resolves dependencies automatically — you never maintain a bundler config.
Every component name maps to a folder path, and each underscore is a folder separator:1$my_app → my/app/2$my_app_header → my/app/header/Module folder names never contain an underscore — use nested folders for multi-word names. If a component you use never shows up in the bundle, the folder path almost always doesn't match the class name.
A component is a folder with up to four files:FilePurposename.view.treeDeclarative layoutname.view.tsBehaviour (TypeScript)name.view.css.tsTyped stylesname.view.tree, index.htmlEntry point for an app moduleThe index.html of an app mounts the root component:1<bodymol_view_root>2<divmol_view_root="$my_app"></div>3<scriptsrc="web.js"></script>4</body>
The dev server builds on the fly, but you can build any module explicitly from the workspace root:1npmrunstartmy/appThe output lands in my/app/-/ — including web.js, web.css, and web.audit.js. Always check the audit: a clean web.audit.js means no unused dependencies and no type errors.