Skip to content

Commit f57e393

Browse files
committed
Updates. Temporarily remove dev and prod build modes
1 parent 8f6a4af commit f57e393

File tree

6 files changed

+162
-88
lines changed

6 files changed

+162
-88
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
</head>
77
<body>
88
<div id="root"></div>
9-
<script type="application/javascript" src="index.js"></script>
9+
<script type="module" src="index.js"></script>
1010
</body>
1111
</html>

index.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
1-
import Main from "./output/Main";
2-
Main.main();
1+
import * as Main from './output/Main/index';
2+
3+
function main () {
4+
/*
5+
Here we could add variables such as
6+
7+
var baseUrl = process.env.BASE_URL;
8+
9+
Parcel will replace `process.env.BASE_URL`
10+
with the string contents of the BASE_URL environment
11+
variable at bundle/build time.
12+
A .env file can also be used to override shell variables
13+
for more information, see https://en.parceljs.org/env.html
14+
15+
These variables can be supplied to the Main.main function.
16+
However, you will need to change the type to accept variables, by default it is an Effect.
17+
You will probably want to make it a function from String -> Effect ()
18+
*/
19+
20+
Main.main();
21+
}
22+
23+
// HMR setup. For more info see: https://parceljs.org/hmr.html
24+
if (module.hot) {
25+
module.hot.accept(function () {
26+
console.log('Reloaded, running main again');
27+
main();
28+
});
29+
}
30+
31+
console.log('Starting app');
32+
33+
main();

package.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@
1414
},
1515
"author": "Anupam Jain <[email protected]> (https://github.com/ajnsit)",
1616
"license": "MIT",
17-
"dependencies": {
18-
"react": "^16.13.1",
19-
"react-dom": "^16.13.1",
20-
"react-scheduler": "^0.1.0",
21-
"scheduler": "^0.20.1"
22-
},
2317
"devDependencies": {
24-
"cross-env": "^7.0.1",
25-
"parcel": "^2.0.0-beta.2",
26-
"purescript": "^0.14.3",
18+
"parcel": "^2.8.0",
19+
"process": "^0.11.10",
20+
"purescript": "^0.15.6",
2721
"rimraf": "^3.0.2",
28-
"spago": "^0.20.3"
22+
"spago": "^0.20.9"
23+
},
24+
"dependencies": {
25+
"react": "^18.2.0",
26+
"react-dom": "^18.2.0"
2927
}
3028
}

packages.dhall

Lines changed: 109 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ Welcome to your new Dhall package-set!
44
Below are instructions for how to edit this file for most use
55
cases, so that you don't need to know Dhall to use it.
66
7-
## Warning: Don't Move This Top-Level Comment!
8-
9-
Due to how `dhall format` currently works, this comment's
10-
instructions cannot appear near corresponding sections below
11-
because `dhall format` will delete the comment. However,
12-
it will not delete a top-level comment like this one.
13-
147
## Use Cases
158
169
Most will want to do one or both of these options:
@@ -31,28 +24,25 @@ Purpose:
3124
the package set's repo
3225
3326
Syntax:
34-
Replace the overrides' "{=}" (an empty record) with the following idea
35-
The "//" or "⫽" means "merge these two records and
36-
when they have the same value, use the one on the right:"
27+
where `entityName` is one of the following:
28+
- dependencies
29+
- repo
30+
- version
3731
-------------------------------
38-
let override =
39-
{ packageName =
40-
upstream.packageName // { updateEntity1 = "new value", updateEntity2 = "new value" }
41-
, packageName =
42-
upstream.packageName // { version = "v4.0.0" }
43-
, packageName =
44-
upstream.packageName // { repo = "https://www.example.com/path/to/new/repo.git" }
45-
}
32+
let upstream = --
33+
in upstream
34+
with packageName.entityName = "new value"
4635
-------------------------------
4736
4837
Example:
4938
-------------------------------
50-
let overrides =
51-
{ halogen =
52-
upstream.halogen // { version = "master" }
53-
, halogen-vdom =
54-
upstream.halogen-vdom // { version = "v4.0.0" }
55-
}
39+
let upstream = --
40+
in upstream
41+
with halogen.version = "master"
42+
with halogen.repo = "https://example.com/path/to/git/repo.git"
43+
44+
with halogen-vdom.version = "v4.0.0"
45+
with halogen-vdom.dependencies = [ "extra-dependency" ] # halogen-vdom.dependencies
5646
-------------------------------
5747
5848
### Additions
@@ -61,61 +51,107 @@ Purpose:
6151
- Add packages that aren't already included in the default package set
6252
6353
Syntax:
64-
Replace the additions' "{=}" (an empty record) with the following idea:
54+
where `<version>` is:
55+
- a tag (i.e. "v4.0.0")
56+
- a branch (i.e. "master")
57+
- commit hash (i.e. "701f3e44aafb1a6459281714858fadf2c4c2a977")
6558
-------------------------------
66-
let additions =
67-
{ "package-name" =
68-
mkPackage
69-
[ "dependency1"
70-
, "dependency2"
71-
]
72-
"https://example.com/path/to/git/repo.git"
73-
"tag ('v4.0.0') or branch ('master')"
74-
, "package-name" =
75-
mkPackage
76-
[ "dependency1"
77-
, "dependency2"
78-
]
79-
"https://example.com/path/to/git/repo.git"
80-
"tag ('v4.0.0') or branch ('master')"
81-
, etc.
82-
}
59+
let upstream = --
60+
in upstream
61+
with new-package-name =
62+
{ dependencies =
63+
[ "dependency1"
64+
, "dependency2"
65+
]
66+
, repo =
67+
"https://example.com/path/to/git/repo.git"
68+
, version =
69+
"<version>"
70+
}
8371
-------------------------------
8472
8573
Example:
8674
-------------------------------
87-
let additions =
88-
{ benchotron =
89-
mkPackage
90-
[ "arrays"
91-
, "exists"
92-
, "profunctor"
93-
, "strings"
94-
, "quickcheck"
95-
, "lcg"
96-
, "transformers"
97-
, "foldable-traversable"
98-
, "exceptions"
99-
, "node-fs"
100-
, "node-buffer"
101-
, "node-readline"
102-
, "datetime"
103-
, "now"
104-
]
105-
"https://github.com/hdgarrood/purescript-benchotron.git"
106-
"v7.0.0"
107-
}
75+
let upstream = --
76+
in upstream
77+
with benchotron =
78+
{ dependencies =
79+
[ "arrays"
80+
, "exists"
81+
, "profunctor"
82+
, "strings"
83+
, "quickcheck"
84+
, "lcg"
85+
, "transformers"
86+
, "foldable-traversable"
87+
, "exceptions"
88+
, "node-fs"
89+
, "node-buffer"
90+
, "node-readline"
91+
, "datetime"
92+
, "now"
93+
]
94+
, repo =
95+
"https://github.com/hdgarrood/purescript-benchotron.git"
96+
, version =
97+
"v7.0.0"
98+
}
10899
-------------------------------
109100
-}
110-
111-
let mkPackage =
112-
https://raw.githubusercontent.com/purescript/package-sets/psc-0.12.3-20190330/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57
113-
114101
let upstream =
115-
https://github.com/purescript/package-sets/releases/download/psc-0.14.3-20210722/packages.dhall sha256:1ceb43aa59436bf5601bac45f6f3781c4e1f0e4c2b8458105b018e5ed8c30f8c
116-
117-
let overrides = {=}
118-
119-
let additions = {=}
102+
https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20221114/packages.dhall
103+
sha256:408417e1565850b0d5eae0d3ad9e11757202a1b44bb86c1ec2d595e4fef58141
104+
105+
in upstream
106+
with concur-core =
107+
{ dependencies =
108+
[ "aff"
109+
, "aff-bus"
110+
, "arrays"
111+
, "avar"
112+
, "console"
113+
, "control"
114+
, "datetime"
115+
, "effect"
116+
, "either"
117+
, "exceptions"
118+
, "foldable-traversable"
119+
, "free"
120+
, "identity"
121+
, "lazy"
122+
, "maybe"
123+
, "newtype"
124+
, "parallel"
125+
, "prelude"
126+
, "profunctor-lenses"
127+
, "tailrec"
128+
, "transformers"
129+
, "tuples"
130+
]
131+
, repo = "https://github.com/purescript-concur/purescript-concur-core"
132+
, version = "master"
133+
}
134+
with concur-react =
135+
{ dependencies =
136+
[ "aff"
137+
, "arrays"
138+
, "concur-core"
139+
, "console"
140+
, "effect"
141+
, "either"
142+
, "exceptions"
143+
, "maybe"
144+
, "prelude"
145+
, "react"
146+
, "react-dom"
147+
, "transformers"
148+
, "tuples"
149+
, "unsafe-coerce"
150+
, "web-dom"
151+
, "web-events"
152+
, "web-html"
153+
]
154+
, repo = "https://github.com/purescript-concur/purescript-concur-react"
155+
, version = "master"
156+
}
120157

121-
in upstream // overrides // additions

spago.dhall

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
{-
22
Welcome to a Spago project!
33
You can edit this file as you like.
4+
5+
Need help? See the following resources:
6+
- Spago documentation: https://github.com/purescript/spago
7+
- Dhall language tour: https://docs.dhall-lang.org/tutorials/Language-Tour.html
8+
9+
When creating a new Spago project, you can use
10+
`spago init --no-comments` or `spago init -C`
11+
to generate this file without the comments in this block.
412
-}
5-
{ sources = [ "src/**/*.purs", "test/**/*.purs" ]
613
, name = "purescript-concur-starter"
714
, dependencies =
815
[ "concur-core", "concur-react", "console", "effect", "prelude" ]
916
, packages = ./packages.dhall
17+
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
1018
}

test/Main.purs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ module Test.Main where
33
import Prelude
44

55
import Effect (Effect)
6-
import Effect.Console (log)
6+
import Effect.Class.Console (log)
77

88
main :: Effect Unit
99
main = do
10+
log "🍝"
1011
log "You should add some tests."

0 commit comments

Comments
 (0)