New cli release
Added 2 new "types". We now total 5 types of apps to be generated:
USAGE:
elm-webapp <type> <target_directory>
TYPE:
While the generated "src/Server.elm" is the same, you can choose
what kind of "src/Client.elm" to generate:
application generates a standard "Browser.application"
document generates a standard "Browser.document"
element generates a standard "Browser.element"
application-element generates a standard "Browser.element" with
routing capabilities like "Browser.application"
but more compatible with browser extensions
This generates a different "src/Server.elm" that comes with "CRUD"
operations with an in-memory server state: Data is preserved on the
Server only while the Server process is running.
crud generates a standard "Browser.application"
with the ability to list, create, edit, and
destroy "Foobar" records
EXAMPLE:
elm-webapp application helloworld
-
application-element
is for generating SPA client code that is more compatible with browser extensions. see https://github.com/jinjor/elm-break-dom and choonkeat/elm-element-navigation#1 -
crud
generates a full CRUD app that persists data in memory; in theServerState
.
crud.demo.mov
The hope is that this helps speed up development; changing the required data easily. Then before releasing the feature, edit the Server.FoobarAPI#updateFromClient
code to persist those memory values in an external DB like Hasura or DynamoDB while leaving the developed src/Client.elm
code untouched
NOTE: courtesy of npm version
, looks like git tags with v
prefix will be npm/cli updates