Skip to content

Commit 570a396

Browse files
authored
Upgrade for PureScript 0.14 and Halogen 6 (#1)
1 parent ee741fb commit 570a396

13 files changed

+3605
-25
lines changed

Diff for: .gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.cache
2-
bower_components
32
dist
4-
node_modules
53

64
.spago
75
generated-docs
86
output
7+
.psc-ide-port
8+
.parcel-cache
9+
node_modules

Diff for: .purs-repl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import Prelude

Diff for: bower.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
"license": "BSD-3-Clause",
1212
"ignore": [
1313
"**/.*",
14-
"node_modules",
15-
"bower_components",
1614
"output"
17-
],
18-
"dependencies": {
19-
"purescript-halogen": "^5.0.0-rc.7"
20-
}
15+
]
2116
}

Diff for: example/.parcelrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "@parcel/config-default",
3+
"transformers": {
4+
"*.md": [ "parcel-transformer-markdown" ],
5+
},
6+
}

Diff for: example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ The following text is rendered by a Halogen component, run `yarn start` to see i
44

55
<halogen-hello></halogen-hello>
66

7-
<script src="main.js"></script>
7+
<script type="module" src="main.js"></script>

Diff for: example/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ <h1>Use Halogen component as a custom element</h1>
44

55
<halogen-hello></halogen-hello>
66

7-
<script src="main.js"></script>
7+
<script type="module" src="main.js"></script>

Diff for: example/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import Main from "./output/Main";
1+
import Main from "../output/Main";
22

33
Main.main();

Diff for: example/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"scripts": {
3-
"start": "parcel README.md"
3+
"start": "parcel index.html"
44
},
55
"devDependencies": {
6-
"marked": "^0.8.0"
6+
"parcel": "^2.2.1"
77
}
88
}

Diff for: example/src/Hello.purs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
module Hello
22
( Message(..)
3-
, Query
43
, Action
54
, component
65
) where
76

87
import Prelude
98

10-
import Data.Const (Const)
119
import Effect.Aff (Aff)
1210
import Halogen as H
1311
import Halogen.HTML as HH
1412

1513
type Message = Void
1614

17-
type Query = Const Void
18-
1915
type Action = Void
2016

2117
type HTML = H.ComponentHTML Action () Aff
@@ -28,10 +24,10 @@ initialState :: State
2824
initialState = unit
2925

3026
render :: State -> HTML
31-
render state =
27+
render _ =
3228
HH.text "hello"
3329

34-
component :: H.Component HH.HTML Query Unit Message Aff
30+
component :: forall q. H.Component q Unit Message Aff
3531
component = H.mkComponent
3632
{ initialState: const initialState
3733
, render

0 commit comments

Comments
 (0)