create-modulo
v1.0.15
Published
Starter projects for Modulo.html - Ready for all uses - Markdown-SSG / SSR / API-backed SPA
Maintainers
Readme
create-modulo
Learn more at: https://ModuloHTML.org
Usage
Start a new project with:
npm init modulo Or specifying a name for your new project:
npm init modulo my-new-modulo-appHow to use
This starter project provides example usage for Modulo.
No installs needed: All HTML files are browser-friendly. Double-click on index.html to view!
Running commands
Step 1: Bring up Dev tools (Right click, inspect, console)
Step 2: Do you see
[ᵐ°dᵘ⁄o]logo and a list of management commands? If there are too many warnings, consider hiding them. Look for a little arrow between[MAIN THREAD]andObject { }. Click on that arrow (and possibly a<prototype>arrow), to expand the full command menu.Step 3: Click the little arrow next to a command to run it, such as
buildoredit
Files to explore
Use files like
app-example.htmlandstatic/components/App.htmlfor examples of building single-page apps with ModuloEdit
static/index.htmlandstatic/components/for Component and templating examples
Advanced
This template comes with Bash shell scripts and Node.js scripts so it's ready-to-go for server-side rendering and static-site generation.
Node.js
The template comes with a Node.js script, which can be used by using a shell wrapper (top, easier) or by invoking Node.js directly (bottom):
$ npm run moduloBrowser automation (requires install)
Firefox or Chromium browser automation is also pre-configured with both GUI and headless modes available, but usage will incur additional installations:
npm run install-browser firefox
npm run firefox-gui buildall
npm run firefox buildallAvailable browsers for installation: firefox and chromium (via Playwright), and
happy-dom (DOM-only)
Default build: The default build command will install firefox and run buildall
