elm-wrap logo elm-wrap

Initialize a directory with elm.json and source files from a template.

wrap application init
wrap application init sandbox
wrap application init -y element

Unlike elm init that only creates elm.json, wrap application init creates elm.json from a template, together with the starter source files.

$ wrap application init
Here is my plan:
  
  Create a new Elm application using the 'application' template.
  
  Location: /Projects/myapplication
  
  Files to create:
  ├── src
  │   └── Main.elm
  └── elm.json
  

Would you like me to proceed? [Y/n]

In addition to the default Browser.application template, there are templates for all application types:

application        Full Browser.application with URL handling (default)
document           Browser.document with title and body
element            Browser.element for embedding in HTML
sandbox            Browser.sandbox for simple programs
worker             Platform.worker application

To install from a specific template, one types wrap application init TEMPLATE.

Helper options

-v, --verbose shows a bunch of debug logs.

-q, --quiet is useful for batch operation, doesn't show the "Here's my plan" friendly banners.

-y, --yes executes commands without asking for confirmation.

see also

wrap application init is synonymous with wrap init

wrap application list-templates to show all available templates.