1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 18:17:03 +00:00

ui: Update README for npm/webpack

This commit is contained in:
James Hillyerd
2018-11-17 19:17:01 -08:00
parent abd9ebeb35
commit c77cae2429

View File

@@ -1,9 +1,7 @@
# Inbucket User Interface # Inbucket User Interface
This directory contains the source code for the Inbucket web user interface. This directory contains the source code for the Inbucket web user interface.
It is written in [Elm] 0.18, a *delightful language for reliable webapps.* It is written in [Elm] 0.19, a *delightful language for reliable webapps.*
The UI was bootstrapped with [Create Elm App].
## Development ## Development
@@ -11,15 +9,18 @@ With `$INBUCKET` as the root of the git repository.
One time setup (assuming [Node.js] is already installed): One time setup (assuming [Node.js] is already installed):
```
npm i create-elm-app@1.10.4 -g
```
In terminal 1 (inbucket daemon):
``` ```
cd $INBUCKET/ui cd $INBUCKET/ui
elm-app build npm i elm -g
npm i
npm run build
```
This will the create `node_modules`, `elm-stuff`, and `dist` directories.
### Terminal 1: inbucket daemon
```
cd $INBUCKET cd $INBUCKET
make make
etc/dev-start.sh etc/dev-start.sh
@@ -29,17 +30,15 @@ Inbucket will start, with HTTP listening on port 9000. You may verify the web
UI is functional if this is your first time building Inbucket, but your dev/test UI is functional if this is your first time building Inbucket, but your dev/test
cycle should favor the development server below. cycle should favor the development server below.
In terminal 2 (elm-app development server): ### Terminal 2: webpack development server
``` ```
cd $INBUCKET/ui cd $INBUCKET/ui
elm-app start npm run dev
``` ```
[Create Elm App] will start a development HTTP server listening on port 3000. npm will start a development HTTP server listening on port 3000. You should use
You should use this server for UI development, as it features hot reload and the this server for UI development, as it features hot reload and the Elm debugger.
Elm debugger.
[Create Elm App]: https://github.com/halfzebra/create-elm-app
[Elm]: https://elm-lang.org [Elm]: https://elm-lang.org
[Node.js]: https://nodejs.org [Node.js]: https://nodejs.org