https://github.com/royalicing/burntcaramel.com
https://github.com/royalicing/burntcaramel.com
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/royalicing/burntcaramel.com
- Owner: RoyalIcing
- Created: 2018-09-04T09:20:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-03T11:10:27.000Z (almost 6 years ago)
- Last Synced: 2025-01-18T23:44:09.254Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.burntcaramel.com
- Size: 3.37 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 2018-burntcaramel.com
Integrate Elm 0.19.0 with [Preact CLI](https://github.com/developit/preact-cli). Elm’s **optimize** mode is on for small bundles.
Create a new project using this by running:
```sh
npm install -g preact-cli
preact create RoyalIcing/elm-preact my-project
cd my-project
npm install
npm run dev
```
## Overview
Preact is used for:
- Routing
- Route/container components
- Webpack handling and configuration
- CSS
Elm is used for:
- Model state & updates
- Subscriptions
See the Profile page for an example of how Elm and Preact interact.
## CLI Commands
``` bash
# install dependencies
npm install
# add new elm dependency
elm install elm/time
# serve with hot reload at localhost:9123
npm run dev
# build for production with minification
npm run build
# test the production build locally
npm run serve
# run tests with jest and preact-render-spy
npm run test
```
For detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md).