Init
Scaffold new Moddable projects
The default template creates a main.js
and minimally configured manifest.json
for running in the simulator.
TypeScript
The --typescript
flag will create a project with Moddable types and a main.ts
to get started:
IO (ECMA 419)
The --io
flag sets up the project to use the TC53 IO manifest in the generated mainfest.json
:
asyncMain
The --asyncMain
flag will enable top level await in your project’s entry file. In XS, TLA is only be available in imported modules by default.
Moddable example
For the --example
flag, it can be used as a boolean to select a project from the list of available Moddable examples:
Or select from a filtered list of projects:
Or if the complete example name is passed, it will be selected by default:
Overwrite
An existing directory matching the project name can be overwritten with the --overwrite
flag: