Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from elm-land/@rhg/vite-plugin-elm-watch
📦 Release v0.20.0 – Improved Developer Experience
- Loading branch information
Showing
56 changed files
with
1,246 additions
and
1,406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { defineConfig } from 'vitepress' | ||
|
||
const version = '0.19.5' | ||
const version = '0.20.0' | ||
|
||
const sidebar = [ | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/dist | ||
/.elm-land | ||
/.env | ||
/elm-stuff | ||
/node_modules | ||
.DS_Store | ||
*.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# 20-auth-error-page | ||
> Built with [Elm Land](https://elm.land) 🌈 | ||
## Local development | ||
|
||
```bash | ||
# Requires Node.js v18+ (https://nodejs.org) | ||
npx elm-land server | ||
``` | ||
|
||
## Deploying to production | ||
|
||
Elm Land projects are most commonly deployed as static websites. | ||
|
||
Please visit [the "Deployment" guide](https://elm.land/guide/deploying) to learn more | ||
about deploying your app for free using Netlify or Vercel. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"app": { | ||
"elm": { | ||
"development": { "debugger": true }, | ||
"production": { "debugger": false } | ||
}, | ||
"env": [], | ||
"html": { | ||
"attributes": { | ||
"html": { "lang": "en" }, | ||
"head": {} | ||
}, | ||
"title": "Elm Land", | ||
"meta": [ | ||
{ "charset": "UTF-8" }, | ||
{ "http-equiv": "X-UA-Compatible", "content": "IE=edge" }, | ||
{ "name": "viewport", "content": "width=device-width, initial-scale=1.0" } | ||
], | ||
"link": [], | ||
"script": [] | ||
}, | ||
"router": { | ||
"useHashRouting": false | ||
}, | ||
"proxy": null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"type": "application", | ||
"source-directories": [ | ||
"src", | ||
".elm-land/src" | ||
], | ||
"elm-version": "0.19.1", | ||
"dependencies": { | ||
"direct": { | ||
"elm/browser": "1.0.2", | ||
"elm/core": "1.0.5", | ||
"elm/html": "1.0.0", | ||
"elm/json": "1.1.3", | ||
"elm/url": "1.0.0" | ||
}, | ||
"indirect": { | ||
"elm/time": "1.0.0", | ||
"elm/virtual-dom": "1.0.3" | ||
} | ||
}, | ||
"test-dependencies": { | ||
"direct": {}, | ||
"indirect": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
module Auth exposing (User, onPageLoad, viewCustomPage) | ||
|
||
import Auth.Action | ||
import Dict | ||
import Html | ||
import Route exposing (Route) | ||
import Route.Path | ||
import Shared | ||
import Shared.Model | ||
import User | ||
import View exposing (View) | ||
|
||
|
||
type alias User = | ||
User.User | ||
|
||
|
||
{-| Called before an auth-only page is loaded. | ||
-} | ||
onPageLoad : Shared.Model -> Route () -> Auth.Action.Action User | ||
onPageLoad shared route = | ||
case shared.authStatus of | ||
Shared.Model.NotLoggedIn -> | ||
Auth.Action.loadCustomPage | ||
|
||
Shared.Model.LoggedInAs user -> | ||
Auth.Action.loadPageWithUser user | ||
|
||
Shared.Model.TokenExpired -> | ||
Auth.Action.loadCustomPage | ||
|
||
|
||
{-| Renders whenever `Auth.Action.showCustomView` is returned from `onPageLoad`. | ||
-} | ||
viewCustomPage : Shared.Model -> Route () -> View Never | ||
viewCustomPage shared route = | ||
case shared.authStatus of | ||
Shared.Model.NotLoggedIn -> | ||
{ title = "Permission denied" | ||
, body = [ Html.text "You need to be logged in to see this!" ] | ||
} | ||
|
||
Shared.Model.LoggedInAs user -> | ||
{ title = "Loading..." | ||
, body = [] | ||
} | ||
|
||
Shared.Model.TokenExpired -> | ||
{ title = "Token expired" | ||
, body = [ Html.text "Your token expired, here's an error page!" ] | ||
} |
Oops, something went wrong.