Skip to content

Commit dd34957

Browse files
author
Serhii Khoma
committed
feat: html is now multiline
1 parent c86dac0 commit dd34957

File tree

7 files changed

+53
-45
lines changed

7 files changed

+53
-45
lines changed

docs/entry.de50d098.js renamed to docs/entry.3bf0104b.js

Lines changed: 37 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/entry.3bf0104b.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/entry.de50d098.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:foo="http://www.w3.org/2000/svg"><head><meta charset="utf-8"><title>html2purescript</title><style>body{font-family:sans-serif;text-align:center;margin:10px}textarea{width:100%;height:220px}.container{max-width:900px;margin:auto;text-align:left}.title{vertical-align:middle}.title .picker,h1{font-size:20px}label{display:block;color:#ac450a;border-bottom:1px solid #ac450a;margin-bottom:5px}section{margin:20px auto}</style></head><body> <script src="entry.de50d098.js"></script> </body></html>
1+
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:foo="http://www.w3.org/2000/svg"><head><meta charset="utf-8"><title>html2purescript</title><style>body{font-family:sans-serif;text-align:center;margin:10px}textarea{width:100%;height:220px}.container{max-width:900px;margin:auto;text-align:left}.title{vertical-align:middle}.title .picker,h1{font-size:20px}label{display:block;color:#ac450a;border-bottom:1px solid #ac450a;margin-bottom:5px}section{margin:20px auto}</style></head><body> <script src="entry.3bf0104b.js"></script> </body></html>

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
"scripts": {
44
"dev:spago": "spago build --watch",
55
"dev:server": "parcel watch index.html",
6-
"build": "rm -fdr ./docs && spago build && parcel build --no-autoinstall --public-url './' --out-dir ./docs index.html"
6+
"build": "rm -fdr ./docs && spago build && parcel build --no-autoinstall --public-url './' --out-dir ./docs index.html",
7+
"build:serve-locally": "serve ./docs"
78
},
89
"devDependencies": {
910
"parcel-bundler": "^1.12.4",
10-
"purescript-psa": "^0.7.3"
11+
"purescript-psa": "^0.7.3",
12+
"serve": "^11.3.2"
1113
}
1214
}

packages.dhall

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,14 @@ let additions =
135135
, version =
136136
"master"
137137
}
138-
, boxes =
138+
, prettyprinter =
139139
{ dependencies =
140-
[ "generics-rep", "prelude", "profunctor", "strings", "stringutils" ]
141-
, repo = "https://github.com/srghma/purescript-boxes.git"
140+
[ "prelude"
141+
, "unfoldable"
142+
, "console"
143+
, "stringutils"
144+
]
145+
, repo = "https://github.com/srghma/purescript-prettyprinter.git"
142146
, version = "master"
143147
}
144148
, ps-cst =
@@ -153,9 +157,9 @@ let additions =
153157
, "node-path"
154158
, "node-fs-aff"
155159
, "ansi"
156-
, "boxes"
160+
, "prettyprinter"
157161
]
158-
, repo = "https://github.com/purescript-codegen/purescript-ps-cst.git"
162+
, repo = "https://github.com/srghma/purescript-ps-cst.git"
159163
, version = "master"
160164
}
161165
}

src/Parser/Halogen.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Unsafe.Coerce (unsafeCoerce)
1818

1919
toHalogen :: String -> Either ParseError String
2020
toHalogen content = parseHTML content <#> \htmls ->
21-
printModuleToString (outputModule htmls)
21+
printModuleToString 80 (outputModule htmls)
2222

2323
outputModule :: List HTML -> Module
2424
outputModule htmls =

0 commit comments

Comments
 (0)