Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fpapado/elm-donate-demo


https://github.com/fpapado/elm-donate-demo

donate elm stripe

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

        

# Elm Donation Demo

An Elm application to set up donations, as outlined in https://discourse.elm-lang.org/t/help-with-foundation-elm-lang-org/5276.

NOTE: Currently there is no real wiring to get the checkout ID.

## Prerequisites

You will need to [install the Elm compiler](https://guide.elm-lang.org/install/elm.html)

You will also need a terminal, such as Terminal on Mac, Gnome Terminal on Linux, or Powershell on Windows.

Optionally, if you want to use the development toolchain that watches and updates files, you will need to [install Node](https://nodejs.org/en/download/).

## Build

The main Elm files are under `src`.
Static files, like the HTML and CSS are under the `static` directory.

To build this project, in a terminal, type:

```shell
mkdir dist
cp static/* dist/
elm make src/Donate.elm --output dist/donate.js --optimize
```

The resulting files should be under the `dist` directory!

### Using npm scripts

Alternatively, if you have Node installed, you have access to `npm` scripts.

You can then type in a terminal:

```shell
npm ci
npm run build
```

And it should hopefully have the same effect!
(Note: I have not tested this on Windows; it is likely that you will need to change the scripts in package.json for that to work. Please send a PR if you work this out)

## Development

For development, I would recommend installing Node as mentioned previously.

Then, in a terminal, type:

```shell
npm ci
npm run dev
```

If you navigate to localhost:5000, you should see the application.