Skip to content

Update to work with Purescript 0.15.10. #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!doctype>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Purescript Concur UI</title>
</head>
<body>
<div id="root"></div>
<script type="application/javascript" src="index.js"></script>
</body>
<head>
<meta charset="utf-8">
<title>Purescript Concur UI</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="index.js"></script>
</body>
</html>
35 changes: 33 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
import Main from "./output/Main";
Main.main();
import * as Main from './output/Main/index';

function main () {
/*
Here we could add variables such as

var baseUrl = process.env.BASE_URL;

Parcel will replace `process.env.BASE_URL`
with the string contents of the BASE_URL environment
variable at bundle/build time.
A .env file can also be used to override shell variables
for more information, see https://en.parceljs.org/env.html

These variables can be supplied to the Main.main function.
However, you will need to change the type to accept variables, by default it is an Effect.
You will probably want to make it a function from String -> Effect ()
*/

Main.main();
}

// HMR setup. For more info see: https://parceljs.org/hmr.html
if (module.hot) {
module.hot.accept(function () {
console.log('Reloaded, running main again');
main();
});
}

console.log('Starting app');

main();
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
"author": "",
"license": "ISC",
"devDependencies": {
"parcel-bundler": "^1.12.4",
"purescript": "^0.13.6",
"rimraf": "^3.0.0",
"spago": "^0.14.0"
"esbuild": "^0.17.5",
"parcel": "^2.8.3",
"process": "^0.11.10",
"purescript": "^0.15.10",
"rimraf": "^3.0.2",
"spago": "^0.20.9"
},
"dependencies": {
"react": "^16.13.0",
"react-dom": "^16.13.0"
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
3 changes: 2 additions & 1 deletion packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ let additions =


let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.13.6-20200309/packages.dhall sha256:9221987b4e7ea99ccd0efbe056f7bebc872cd92e0058efe5baa181d73359e7b3
https://github.com/purescript/package-sets/releases/download/psc-0.15.10-20230910/packages.dhall
sha256:6cacc71cf19ba3ed3b2176a3bb845a8b5a2acb5913b2b6816170e1f7257f340e

let overrides = {=}

Expand Down
11 changes: 10 additions & 1 deletion spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ You can edit this file as you like.
-}
{ name = "my-project"
, dependencies =
[ "concur-core"
[ "arrays"
, "concur-core"
, "concur-react"
, "console"
, "effect"
, "foldable-traversable"
, "integers"
, "maybe"
, "numbers"
, "ordered-collections"
, "prelude"
, "psci-support"
, "react"
, "strings"
, "strings-extra"
, "tuples"
, "unsafe-coerce"
]
, packages = ./packages.dhall
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
Expand Down
Loading